* Keeping the Team Together: How Intra-Party Divisions Shape Party Behavior Across Issues
* Felix Lehmann
* Department of Political Science, University of Gothenburg
* felix.lehmann@gu.se; Sprängkullsgatan 19, Box 711, 411 23 Göteborg, Sweden

* Replication file for the Appendix
* Always run the main script first

* Appendix A
* change the working directory to the designated folder structure
cd "..."

* load the dataset
use "Keeping the team together_data2.dta", clear

* Table A1
asdoc sum eu_salience eu_position_change_abs eu_blur_std eu_dissent multicult_salience multicult_position_change_abs multiculturalism_blur_std multicult_dissent immigrate_salience immigration_position_change_abs immigrate_policy_blur_std immigrate_dissent lrecon_salience lrecon_position_change_abs lrecon_blur_std lrecon_dissent vote vote_change government, label replace dec(3)

asdoc sum eu_salience eu_position_change_abs eu_blur_std eu_divisions_ccs multicult_salience multicult_position_change_abs multiculturalism_blur_std multicult_divisions_ccs enviro_salience environment_position_change_abs environment_blur_std environment_divisions_ccs redist_salience redist_position_change_abs redistribution_blur_std redist_divisions_ccs civlib_salience civlib_position_change_abs civlib_laworder_blur_std order_divisions_ccs social_salience social_position_change_abs sociallifestyle_blur_std ssm_divisions_ccs vote vote_change government, label replace dec(3)

use "Keeping the team together_data_stacked2.dta", clear
asdoc sum salience abs_position_change blur issue_divisions1 vote vote_change government if issue_divisions1 != ., label replace dec(3)
asdoc sum salience abs_position_change blur issue_divisions2 vote vote_change government if issue_divisions2 != ., label replace dec(3)
// Figure A1

set scheme s1mono
use "Keeping the team together_data_stacked2.dta", clear

set scheme plotplain

hist salience if issue_selection1 == 1, title("CHES sample")
graph save g1, replace
hist abs_position_change if issue_selection1 == 1, title("CHES sample")
graph save g2, replace
hist blur if issue_selection1 == 1, title("CHES sample") 
graph save g3, replace 

hist salience if issue_selection2 == 1, title("CCS sample") 
graph save g4, replace
hist abs_position_change if issue_selection2 == 1, title("CCS sample") 
graph save g5, replace
hist blur if issue_selection2 == 1, title("CCS sample")  
graph save g6, replace 

graph combine "g1" "g2" "g3" "g4" "g5" "g6", col(3)

graph export "figa1.png", replace


* Figure A2
use "Keeping the team together_data2.dta", clear
set scheme plotplain

graph hbar (mean) eu_dissent if eu_divisions_ccs != ., over(family_simple, sort(eu_dissent) descending) title("(A) CHES EU", margin(b=1) size(med)) note("") ytitle("") blabel(bar, format(%4.1f))  bar(1, color(dknavy))
graph save g1, replace
graph hbar (mean) multicult_dissent if multicult_divisions_ccs != ., over(family_simple, sort(multicult_dissent) descending) title("(B) CHES Multiculturalism", margin(b=1) size(med)) note("") ytitle("") blabel(bar, format(%4.1f))  bar(1, color(dknavy))
graph save g2, replace
graph hbar (mean) eu_divisions_ccs if eu_dissent != . , over(family_simple, sort(eu_divisions_ccs) descending) title("(C) CCS EU", margin(b=1) size(med)) note("") ytitle("") blabel(bar, format(%4.1f))  bar(1, color(dknavy))
graph save g3, replace
graph hbar (mean) multicult_divisions_ccs if multicult_dissent != . , over(family_simple, sort(multicult_divisions_ccs) descending) title("(C) CCS Multiculturalism", margin(b=1) size(med)) note("") ytitle("") blabel(bar, format(%4.1f))  bar(1, color(dknavy))
graph save g4, replace

graph combine "g1" "g2" "g3" "g4"

graph export "figa2.png", replace

* Figure A3
* Correlation between the two indicators
use "Keeping the team together_data2.dta", clear

pwcorr eu_dissent eu_divisions_ccs, sig star(0.001) obs
pwcorr multicult_dissent multicult_divisions_ccs, sig star(0.001) obs
reg eu_dissent eu_divisions_ccs
reg multicult_dissent multicult_divisions_ccs

set scheme s1mono

sc eu_dissent eu_divisions_ccs, msymbol(Oh) || lfit eu_dissent eu_divisions_ccs, title("{bf:EU}", margin(b=1) size(medlarge)) lwidth(medthick) ylabel(0 (2) 8)  xlabel(0 (1) 10) legend(off) ytitle(EU divisions CHES) xtitle(EU divisions CCS) lpattern(solid) lwidth(thick) note(r = 0.15*, ring(0) pos(1) size(med)) mcolor(gs0) lcolor(dknavy) msize(small)
graph save g1, replace
sc multicult_dissent multicult_divisions_ccs, msymbol(Oh) || lfit multicult_dissent multicult_divisions_ccs, title("{bf:Multiculturalism}", margin(b=1) size(medlarge)) lwidth(medthick) ylabel(0 (2) 8)  xlabel(0 (1) 10) legend(off) ytitle(Multiculturalism divisions CHES) xtitle(Multiculturalism divisions CCS) lpattern(solid) lwidth(thick) note(r = 0.20, ring(0) pos(1) size(med)) mcolor(gs0) lcolor(dknavy) msize(small)
graph save g2, replace

graph combine "g1" "g2", caption("+ p < 0.1, * p < 0.05, ** p < 0.01, *** p < 0.001", position(5) justification(right) size(vsmall)) 

graph export "figa3.png", replace


* Appendix B - Robustness checks
* Figure B1
use "Keeping the team together_data_stacked2.dta", clear

set scheme plotplain

pwcorr salience issue_divisions1, sig star(0.001) obs
reg salience issue_divisions1
pwcorr abs_position_change issue_divisions1, sig star(0.001) obs
reg abs_position_change issue_divisions1
pwcorr blur issue_divisions1, sig star(0.001) obs
reg blur issue_divisions1

sc salience issue_divisions1 || lfit salience issue_divisions1, title("H1", margin(b=1) size(medlarge)) lwidth(medthick) ylabel(0 (2) 10) xlabel(0 (2) 10) legend(off) ytitle(Salience) lpattern(solid) lwidth(thick) note(r = -0.22***, ring(0) pos(1) size(med)) mcolor(gs0) lcolor(dknavy) msize(small)
graph save g1, replace
sc abs_position_change issue_divisions1 || lfit abs_position_change issue_divisions1, title("H2", margin(b=1) size(medlarge)) lwidth(medthick) ylabel(0 (2) 6) xlabel(0 (2) 10) legend(off) ytitle(Δ Position) lpattern(solid) lwidth(thick) note(r = 0.15***, ring(0) pos(1) size(med)) mcolor(gs0) lcolor(dknavy) msize(small)
graph save g2, replace
sc blur issue_divisions1 || lfit blur issue_divisions1, title("H3", margin(b=1) size(medlarge)) lwidth(medthick) ylabel(0 (2) 10) xlabel(0 (2) 10) legend(off) ytitle(Blur) lpattern(solid) lwidth(thick) note(r = 0.22***, ring(0) pos(1) size(med)) mcolor(gs0) lcolor(dknavy) msize(small)
graph save g3, replace

graph combine "g1" "g2" "g3", title("(A) CHES divisions indicator", size(medium)) caption("+ p < 0.1, * p < 0.05, ** p < 0.01, *** p < 0.001", position(5) justification(right) size(vsmall))

graph export "figb1a.png", replace

use "Keeping the team together_data_stacked2.dta", clear

pwcorr salience issue_divisions2, sig star(0.001) obs
reg salience issue_divisions2
pwcorr abs_position_change issue_divisions2, sig star(0.001) obs
reg abs_position_change issue_divisions2
pwcorr blur issue_divisions2, sig star(0.001) obs
reg blur issue_divisions2

sc salience issue_divisions2 || lfit salience issue_divisions2, title("H1", margin(b=1) size(medlarge)) lwidth(medthick) ylabel(0 (2) 10) xlabel(0 (2) 10) legend(off) ytitle(Salience) lpattern(solid) lwidth(thick) note(r = -0.32***, ring(0) pos(1) size(med)) mcolor(gs0) lcolor(dknavy) msize(small)
graph save g4, replace
sc abs_position_change issue_divisions2 || lfit abs_position_change issue_divisions2, title("H2", margin(b=1) size(medlarge)) lwidth(medthick) ylabel(0 (2) 6) xlabel(0 (2) 10) legend(off) ytitle(Δ Position) lpattern(solid) lwidth(thick) note(r = 0.11***, ring(0) pos(1) size(med)) mcolor(gs0) lcolor(dknavy) msize(small)
graph save g5, replace
sc blur issue_divisions2 || lfit blur issue_divisions2, title("H3", margin(b=1) size(medlarge)) lwidth(medthick) ylabel(0 (2) 10) xlabel(0 (2) 10) legend(off) ytitle(Blur) lpattern(solid) lwidth(thick) note(r = 0.16***, ring(0) pos(1) size(med)) mcolor(gs0) lcolor(dknavy) msize(small)
graph save g6, replace

graph combine "g4" "g5" "g6", title("(B) CCS divisions indicator", size(medium)) caption("+ p < 0.1, * p < 0.05, ** p < 0.01, *** p < 0.001", position(5) justification(right) size(vsmall))

graph export "figb1b.png", replace

graph combine "g1" "g2" "g3" "g4" "g5" "g6" , col(3) caption("+ p < 0.1, * p < 0.05, ** p < 0.01, *** p < 0.001", position(5) justification(right) size(vsmall))

graph export "figb1.png", replace


* Table B1
use "Keeping the team together_data_stacked2.dta", clear

eststo clear
// H1
eststo: reghdfe salience issue_divisions_lag1s vote vote_change government, cluster(party_id) absorb(election_id issue)
estadd local election "Yes"
estadd local issue "Yes"
estadd local cluster "Yes"
eststo: reghdfe salience issue_divisions_lag2s vote vote_change government, cluster(party_id) absorb(election_id issue)
estadd local election "Yes"
estadd local issue "Yes"
estadd local cluster "Yes"
// H2
eststo: reghdfe abs_position_change issue_divisions_lag1s vote vote_change government, cluster(party_id) absorb(election_id issue)
estadd local election "Yes"
estadd local issue "Yes"
estadd local cluster "Yes"
eststo: reghdfe abs_position_change issue_divisions_lag2s vote vote_change government, cluster(party_id) absorb(election_id issue)
estadd local election "Yes"
estadd local issue "Yes"
estadd local cluster "Yes"
// H3
eststo: reghdfe blur issue_divisions_lag1s vote vote_change government, cluster(party_id) absorb(election_id issue)
estadd local election "Yes"
estadd local issue "Yes"
estadd local cluster "Yes"
eststo: reghdfe blur issue_divisions_lag2s vote vote_change government, cluster(party_id) absorb(election_id issue) 
estadd local election "Yes"
estadd local issue "Yes"
estadd local cluster "Yes"

esttab using TableB1.rtf, replace label varwidth(18) se modelwidth(5) compress nogap onecell stats(N election issue cluster, fmt(a2) label ("Observations" "Election FEs" "Issue FEs" "Clustered SEs")) star (+ 0.1 * 0.05 ** 0.01 *** 0.001) nonumbers mtitles(H1 H1 H2 H2 H3 H3 H4 H4) note("Notes: Pooled multivariate regression models testing the effect of issue-specific intra-party divisions on issue salience (H1), absolute position change (H2), and issue blurring (H3). Models 1, 3, and 5 use the CHES division indicator and models 2, 4, and 6 use the CCS division indicator. The two indicators are standardized. Clustered standard errors in parentheses.") b(%9.3fc) order(issue_divisions_lag1s issue_divisions_lag2s vote vote_change government _cons) keep(issue_divisions_lag1s issue_divisions_lag2s vote vote_change government _cons)

* Table B2
use "Keeping the team together_data_stacked2.dta", clear

eststo clear
// H1
eststo: reghdfe salience issue_divisions1_s salience_lag vote vote_change government, cluster(party_id) absorb(election_id issue)
estadd local election "Yes"
estadd local issue "Yes"
estadd local cluster "Yes"
eststo: reghdfe salience issue_divisions2_s salience_lag vote vote_change government, cluster(party_id) absorb(election_id issue)
estadd local election "Yes"
estadd local issue "Yes"
estadd local cluster "Yes"
// H2
eststo: reghdfe abs_position_change issue_divisions1_s abs_position_change_lag vote vote_change government, cluster(party_id) absorb(election_id issue)
estadd local election "Yes"
estadd local issue "Yes"
estadd local cluster "Yes"
eststo: reghdfe abs_position_change issue_divisions2_s abs_position_change_lag vote vote_change government, cluster(party_id) absorb(election_id issue)
estadd local election "Yes"
estadd local issue "Yes"
estadd local cluster "Yes"
// H3
eststo: reghdfe blur issue_divisions1_s blur_lag vote vote_change government, cluster(party_id) absorb(election_id issue)
estadd local election "Yes"
estadd local issue "Yes"
estadd local cluster "Yes"
eststo: reghdfe blur issue_divisions2_s blur_lag vote vote_change government, cluster(party_id) absorb(election_id issue) 
estadd local election "Yes"
estadd local issue "Yes"
estadd local cluster "Yes"

esttab using TableB2.rtf, replace label varwidth(16) se modelwidth(5) compress nogap onecell stats(N election issue cluster, fmt(a2) label ("Observations" "Election FEs" "Issue FEs" "Clustered SEs")) star (+ 0.1 * 0.05 ** 0.01 *** 0.001) nonumbers mtitles(H1 H1 H2 H2 H3 H3 H4 H4) note("Notes: Pooled multivariate regression models testing the effect of issue-specific intra-party divisions on issue salience (H1), absolute position change (H2), and issue blurring (H3). Models 1, 3, and 5 use the CHES division indicator and models 2, 4, and 6 use the CCS division indicator. The two indicators are standardized. Clustered standard errors in parentheses.") b(%9.3fc) order(issue_divisions1_s issue_divisions2_s salience_lag abs_position_change_lag blur_lag vote vote_change government _cons) keep(issue_divisions1_s issue_divisions2_s salience_lag abs_position_change_lag blur_lag vote vote_change government _cons)

* Table B3

use "Keeping the team together_data_stacked2.dta", clear

eststo clear
// H1
eststo: reghdfe salience issue_divisions1_s vote vote_change government distance, cluster(party_id) absorb(election_id issue)
estadd local election "Yes"
estadd local issue "Yes"
estadd local cluster "Yes"
eststo: reghdfe salience issue_divisions2_s vote vote_change government distance, cluster(party_id) absorb(election_id issue)
estadd local election "Yes"
estadd local issue "Yes"
estadd local cluster "Yes"
// H2
eststo: reghdfe abs_position_change issue_divisions1_s vote vote_change government distance, cluster(party_id) absorb(election_id issue)
estadd local election "Yes"
estadd local issue "Yes"
estadd local cluster "Yes"
eststo: reghdfe abs_position_change issue_divisions2_s vote vote_change government distance, cluster(party_id) absorb(election_id issue)
estadd local election "Yes"
estadd local issue "Yes"
estadd local cluster "Yes"
// H3
eststo: reghdfe blur issue_divisions1_s vote vote_change government distance, cluster(party_id) absorb(election_id issue)
estadd local election "Yes"
estadd local issue "Yes"
estadd local cluster "Yes"
eststo: reghdfe blur issue_divisions2_s vote vote_change government distance, cluster(party_id) absorb(election_id issue) 
estadd local election "Yes"
estadd local issue "Yes"
estadd local cluster "Yes"

esttab using b3.rtf, replace label varwidth(16) se modelwidth(5) compress nogap onecell stats(N election issue cluster, fmt(a2) label ("Observations" "Election FEs" "Issue FEs" "Clustered SEs")) star (+ 0.1 * 0.05 ** 0.01 *** 0.001) nonumbers mtitles(H1 H1 H2 H2 H3 H3 H4 H4) note("Notes: Pooled multivariate regression models testing the effect of issue-specific intra-party divisions on issue salience (H1), absolute position change (H2), and issue blurring (H3). Models 1, 3, and 5 use the CHES division indicator and models 2, 4, and 6 use the CCS division indicator. The two indicators are standardized. Clustered standard errors in parentheses.") b(%9.3fc) order(issue_divisions1_s issue_divisions2_s vote vote_change government distance _cons) keep(issue_divisions1_s issue_divisions2_s vote vote_change government distance _cons)



* Table B4

use "Keeping the team together_data_stacked2.dta", clear

eststo clear
// H1
eststo: reghdfe salience issue_divisions1_s vote vote_change government distance_lag, cluster(party_id) absorb(election_id issue)
estadd local election "Yes"
estadd local issue "Yes"
estadd local cluster "Yes"
eststo: reghdfe salience issue_divisions2_s vote vote_change government distance_lag, cluster(party_id) absorb(election_id issue)
estadd local election "Yes"
estadd local issue "Yes"
estadd local cluster "Yes"
// H2
eststo: reghdfe abs_position_change issue_divisions1_s vote vote_change government distance_lag, cluster(party_id) absorb(election_id issue)
estadd local election "Yes"
estadd local issue "Yes"
estadd local cluster "Yes"
eststo: reghdfe abs_position_change issue_divisions2_s vote vote_change government distance_lag, cluster(party_id) absorb(election_id issue)
estadd local election "Yes"
estadd local issue "Yes"
estadd local cluster "Yes"
// H3
eststo: reghdfe blur issue_divisions1_s vote vote_change government distance_lag, cluster(party_id) absorb(election_id issue)
estadd local election "Yes"
estadd local issue "Yes"
estadd local cluster "Yes"
eststo: reghdfe blur issue_divisions2_s vote vote_change government distance_lag, cluster(party_id) absorb(election_id issue) 
estadd local election "Yes"
estadd local issue "Yes"
estadd local cluster "Yes"

esttab using b4.rtf, replace label varwidth(16) se modelwidth(5) compress nogap onecell stats(N election issue cluster, fmt(a2) label ("Observations" "Election FEs" "Issue FEs" "Clustered SEs")) star (+ 0.1 * 0.05 ** 0.01 *** 0.001) nonumbers mtitles(H1 H1 H2 H2 H3 H3 H4 H4) note("Notes: Pooled multivariate regression models testing the effect of issue-specific intra-party divisions on issue salience (H1), absolute position change (H2), and issue blurring (H3). Models 1, 3, and 5 use the CHES division indicator and models 2, 4, and 6 use the CCS division indicator. The two indicators are standardized. Clustered standard errors in parentheses.") b(%9.3fc) order(issue_divisions1_s issue_divisions2_s vote vote_change government distance_lag _cons) keep(issue_divisions1_s issue_divisions2_s vote vote_change government distance_lag _cons)


* Table B5
use "Keeping the team together_data_stacked2.dta", clear

eststo clear
// H1
eststo: reghdfe salience issue_divisions1_s vote vote_change government supporter_division_ees, cluster(party_id) absorb(election_id issue)
estadd local election "Yes"
estadd local issue "Yes"
estadd local cluster "Yes"
eststo: reghdfe salience issue_divisions2_s vote vote_change government supporter_division_ees, cluster(party_id) absorb(election_id issue)
estadd local election "Yes"
estadd local issue "Yes"
estadd local cluster "Yes"
// H2
eststo: reghdfe abs_position_change issue_divisions1_s vote vote_change government supporter_division_ees, cluster(party_id) absorb(election_id issue)
estadd local election "Yes"
estadd local issue "Yes"
estadd local cluster "Yes"
eststo: reghdfe abs_position_change issue_divisions2_s vote vote_change government supporter_division_ees, cluster(party_id) absorb(election_id issue)
estadd local election "Yes"
estadd local issue "Yes"
estadd local cluster "Yes"
// H3
eststo: reghdfe blur issue_divisions1_s vote vote_change government supporter_division_ees, cluster(party_id) absorb(election_id issue)
estadd local election "Yes"
estadd local issue "Yes"
estadd local cluster "Yes"
eststo: reghdfe blur issue_divisions2_s vote vote_change government supporter_division_ees, cluster(party_id) absorb(election_id issue) 
estadd local election "Yes"
estadd local issue "Yes"
estadd local cluster "Yes"

esttab using b5.rtf, replace label varwidth(16) se modelwidth(5) compress nogap onecell stats(N election issue cluster, fmt(a2) label ("Observations" "Election FEs" "Issue FEs" "Clustered SEs")) star (+ 0.1 * 0.05 ** 0.01 *** 0.001) nonumbers mtitles(H1 H1 H2 H2 H3 H3 H4 H4) note("Notes: Pooled multivariate regression models testing the effect of issue-specific intra-party divisions on issue salience (H1), absolute position change (H2), and issue blurring (H3). Models 1, 3, and 5 use the CHES division indicator and models 2, 4, and 6 use the CCS division indicator. The two indicators are standardized. Clustered standard errors in parentheses.") b(%9.3fc) order(issue_divisions1_s issue_divisions2_s vote vote_change government supporter_division_ees _cons) keep(issue_divisions1_s issue_divisions2_s vote vote_change government supporter_division_ees _cons)

* Table B6

use "Keeping the team together_data_stacked2.dta", clear

eststo clear
// H1
eststo: reghdfe salience issue_divisions1_s vote vote_change government supporter_division_ees_lag, cluster(party_id) absorb(election_id issue)
estadd local election "Yes"
estadd local issue "Yes"
estadd local cluster "Yes"
eststo: reghdfe salience issue_divisions2_s vote vote_change government supporter_division_ees_lag, cluster(party_id) absorb(election_id issue)
estadd local election "Yes"
estadd local issue "Yes"
estadd local cluster "Yes"
// H2
eststo: reghdfe abs_position_change issue_divisions1_s vote vote_change government supporter_division_ees_lag, cluster(party_id) absorb(election_id issue)
estadd local election "Yes"
estadd local issue "Yes"
estadd local cluster "Yes"
eststo: reghdfe abs_position_change issue_divisions2_s vote vote_change government supporter_division_ees_lag, cluster(party_id) absorb(election_id issue)
estadd local election "Yes"
estadd local issue "Yes"
estadd local cluster "Yes"
// H3
eststo: reghdfe blur issue_divisions1_s vote vote_change government supporter_division_ees_lag, cluster(party_id) absorb(election_id issue)
estadd local election "Yes"
estadd local issue "Yes"
estadd local cluster "Yes"
eststo: reghdfe blur issue_divisions2_s vote vote_change government supporter_division_ees_lag, cluster(party_id) absorb(election_id issue) 
estadd local election "Yes"
estadd local issue "Yes"
estadd local cluster "Yes"

esttab using b6.rtf, replace label varwidth(16) se modelwidth(5) compress nogap onecell stats(N election issue cluster, fmt(a2) label ("Observations" "Election FEs" "Issue FEs" "Clustered SEs")) star (+ 0.1 * 0.05 ** 0.01 *** 0.001) nonumbers mtitles(H1 H1 H2 H2 H3 H3 H4 H4) note("Notes: Pooled multivariate regression models testing the effect of issue-specific intra-party divisions on issue salience (H1), absolute position change (H2), and issue blurring (H3). Models 1, 3, and 5 use the CHES division indicator and models 2, 4, and 6 use the CCS division indicator. The two indicators are standardized. Clustered standard errors in parentheses.") b(%9.3fc) order(issue_divisions1_s issue_divisions2_s vote vote_change government supporter_division_ees_lag _cons) keep(issue_divisions1_s issue_divisions2_s vote vote_change government supporter_division_ees_lag _cons)


* Table B9

use "Keeping the team together_data_stacked2.dta", clear

eststo clear
eststo: qui: logit abs_position_change_bi issue_divisions1_s vote vote_change government i.election_id i.issue, vce(cluster party_id) 
estadd local election "Yes"
estadd local issue "Yes"
estadd local cluster "Yes"
eststo: qui: logit abs_position_change_bi issue_divisions2_s vote vote_change government i.election_id i.issue, vce(cluster party_id) 
estadd local election "Yes"
estadd local issue "Yes"
estadd local cluster "Yes"
eststo: qui: logit abs_position_change_bi_low issue_divisions1_s vote vote_change government i.election_id i.issue, vce(cluster party_id) 
estadd local election "Yes"
estadd local issue "Yes"
estadd local cluster "Yes"
eststo: qui: logit abs_position_change_bi_low issue_divisions2_s vote vote_change government i.election_id i.issue, vce(cluster party_id) 
estadd local election "Yes"
estadd local issue "Yes"
estadd local cluster "Yes"
eststo: qui: logit abs_position_change_bi_high issue_divisions1_s vote vote_change government i.election_id i.issue, vce(cluster party_id) 
estadd local election "Yes"
estadd local issue "Yes"
estadd local cluster "Yes"
eststo: logit abs_position_change_bi_high issue_divisions2_s vote vote_change government i.election_id i.issue, vce(cluster party_id) 
estadd local election "Yes"
estadd local issue "Yes"
estadd local cluster "Yes"

esttab using b9.rtf, replace label varwidth(14) se modelwidth(5) compress nogap eform onecell stats(N election issue cluster, fmt(a2) label ("Observations" "Election FEs" "Issue FEs" "Clustered SEs")) star (+ 0.1 * 0.05 ** 0.01 *** 0.001) nonumbers mtitles(H2 H2 H2 H2 H2 H2) note("Notes: Pooled multivariate logistic regression models testing the effect of issue-specific intra-party divisions on three different binary indicators of absolute position change (H2). The binary dependent variable in models 1 and 2 has a medium threshold, the binary dependent variable in models 3 and 4 has a low threshold, and the binary dependent variable in models 5 and 6 has a high threshold. The Models 1, 3, and 5 use the CHES divisions indicator and models 2, 4, and 6 use the CCS divisions indicator. The two divisions indicators are standardized. Clustered standard errors in parentheses. The coefficients are odds ratios.") b(%9.3fc) order(issue_divisions1_s issue_divisions2_s vote vote_change government _cons) keep(issue_divisions1_s issue_divisions2_s vote vote_change government _cons)

* Figure B3
use "Keeping the team together_data2.dta", clear

pwcorr eu_blur eu_dissent, sig star(0.001) obs
pwcorr lrecon_blur lrecon_dissent, sig star(0.001) obs

pwcorr eu_blur eu_divisions_ccs, sig star(0.001) obs
pwcorr lrecon_blur economy_divisions_ccs, sig star(0.001) obs

set scheme s1mono
sc eu_blur eu_dissent, msymbol(Oh) || lfit eu_blur eu_dissent, title("{bf:EU}", margin(b=1) size(medlarge)) lwidth(medthick) ylabel(0 (2) 10)  xlabel(0 (2) 10) legend(off) ytitle(EU blur) lpattern(solid) lwidth(thick) note(r = 0.28***, ring(0) pos(1) size(med)) mcolor(gs0) lcolor(dknavy) msize(small)
graph save g1, replace
sc lrecon_blur lrecon_dissent, msymbol(Oh) || lfit lrecon_blur lrecon_dissent, title("{bf:Economy}", margin(b=1) size(medlarge)) lwidth(medthick) ylabel(0 (2) 10)  xlabel(0 (2) 10) legend(off) ytitle(Economy blur) lpattern(solid) lwidth(thick) note(r = 0.19***, ring(0) pos(1) size(med)) mcolor(gs0) lcolor(dknavy) msize(small)
graph save g2, replace

graph combine "g1" "g2", title("(A) CHES divisions indicator", size(medium)) 
graph save n1, replace 

sc eu_blur eu_divisions_ccs, msymbol(Oh) || lfit eu_blur eu_divisions_ccs, title("{bf:EU}", margin(b=1) size(medlarge)) lwidth(medthick) ylabel(0 (2) 10)  xlabel(0 (2) 10) legend(off) ytitle(EU blur) lpattern(solid) lwidth(thick) note(r = 0.14, ring(0) pos(1) size(med)) mcolor(gs0) lcolor(dknavy) msize(small)
graph save g3, replace
sc lrecon_blur economy_divisions_ccs, msymbol(Oh) || lfit lrecon_blur economy_divisions_ccs, title("{bf:Economy}", margin(b=1) size(medlarge)) lwidth(medthick) ylabel(0 (2) 10)  xlabel(0 (2) 10) legend(off) ytitle(Economy blur) lpattern(solid) lwidth(thick) note(r = 0.21+, ring(0) pos(1) size(med)) mcolor(gs0) lcolor(dknavy) msize(small)
graph save g4, replace

graph combine "g3" "g4", title("(B) CCS divisions indicator", size(medium))
graph save n2, replace 

graph combine "n1" "n2", col(1) caption("+ p < 0.1, * p < 0.05, ** p < 0.01, *** p < 0.001", position(5) justification(right) size(vsmall))

graph export "figb3.png", replace

* Table B10
use "Keeping the team together_data_stacked2.dta", clear

eststo clear
// H3
eststo: reghdfe blur2 issue_divisions1 vote vote_change government, cluster(party_id) absorb(election_id issue)
estadd local election "Yes"
estadd local issue "Yes"
estadd local cluster "Yes"
eststo: reghdfe blur2 issue_divisions3 vote vote_change government, cluster(party_id) absorb(election_id issue)
estadd local election "Yes"
estadd local issue "Yes"
estadd local cluster "Yes"

esttab using b10.rtf, replace label varwidth(16) se modelwidth(5) compress nogap onecell stats(N election issue cluster, fmt(a2) label ("Observations" "Election FEs" "Issue FEs" "Clustered SEs")) star (+ 0.1 * 0.05 ** 0.01 *** 0.001) nonumbers mtitles(H3 H3) note("Notes: Pooled multivariate regression models testing the effect of issue-specific intra-party divisions on issue blurring (H3). Model 1 uses the CHES divisions indicator and model 2 uses the CCS divisions indicator. Clustered standard errors in parentheses.") b(%9.3fc) order(issue_divisions1 issue_divisions3 vote vote_change government _cons) keep(issue_divisions1 issue_divisions3 vote vote_change government _cons)


 * Table B11
use "Keeping the team together_data_stacked2.dta", clear

eststo clear

// H2 if 
eststo: reghdfe abs_position_change issue_divisions1_s extreme_position_lag vote vote_change government, cluster(party_id) absorb(election_id issue)
estadd local election "Yes"
estadd local issue "Yes"
estadd local cluster "Yes"
eststo: reghdfe abs_position_change issue_divisions2_s extreme_position_lag vote vote_change government, cluster(party_id) absorb(election_id issue)
estadd local election "Yes"
estadd local issue "Yes"
estadd local cluster "Yes"


esttab using b11.rtf, replace label varwidth(24) se modelwidth(5) compress nogap onecell stats(N election issue cluster, fmt(a2) label ("Observations" "Election FEs" "Issue FEs" "Clustered SEs")) star (+ 0.1 * 0.05 ** 0.01 *** 0.001) nonumbers mtitles(H2 H2) note("Notes: Pooled multivariate regression models of the relationship between intra-party divisions and position change (H2). Model 1 uses the CHES division indicator and model 2 uses the CCS division indicator. The two indicators are standardized. Clustered standard errors in parentheses.") b(%9.3fc) order(issue_divisions1_s issue_divisions2_s extreme_position_lag vote vote_change government _cons) keep(issue_divisions1_s issue_divisions2_s extreme_position_lag vote vote_change government _cons)

* Figure B4
use "Keeping the team together_data_stacked2.dta", clear

eststo clear
eststo: reghdfe salience issue_divisions1_s vote vote_change government, cluster(party_id) absorb(election_id issue)
estimate store base
eststo: reghdfe salience issue_divisions1_s vote vote_change government if issue != 1, cluster(party_id) absorb(election_id issue)
estimate store no_eu
eststo: reghdfe salience issue_divisions1_s vote vote_change government if issue != 3, cluster(party_id) absorb(election_id issue)
estimate store no_mc
eststo: reghdfe salience issue_divisions1_s vote vote_change government if issue != 5, cluster(party_id) absorb(election_id issue)
estimate store no_imm
eststo: reghdfe salience issue_divisions1_s vote vote_change government if issue != 10, cluster(party_id) absorb(election_id issue)
estimate store no_eco

eststo: reghdfe abs_position_change issue_divisions1_s vote vote_change government, cluster(party_id) absorb(election_id issue)
estimate store base2
eststo: reghdfe abs_position_change issue_divisions1_s vote vote_change government if issue != 1, cluster(party_id) absorb(election_id issue)
estimate store no_eu2
eststo: reghdfe abs_position_change issue_divisions1_s vote vote_change government if issue != 3, cluster(party_id) absorb(election_id issue)
estimate store no_mc2
eststo: reghdfe abs_position_change issue_divisions1_s vote vote_change government if issue != 5, cluster(party_id) absorb(election_id issue)
estimate store no_imm2
eststo: reghdfe abs_position_change issue_divisions1_s vote vote_change government if issue != 10, cluster(party_id) absorb(election_id issue)
estimate store no_eco2

eststo: reghdfe blur issue_divisions1_s vote vote_change government, cluster(party_id) absorb(election_id issue)
estimate store base3
eststo: reghdfe blur issue_divisions1_s vote vote_change government if issue != 1, cluster(party_id) absorb(election_id issue)
estimate store no_eu3
eststo: reghdfe blur issue_divisions1_s vote vote_change government if issue != 3, cluster(party_id) absorb(election_id issue)
estimate store no_mc3
eststo: reghdfe blur issue_divisions1_s vote vote_change government if issue != 5, cluster(party_id) absorb(election_id issue)
estimate store no_imm3
eststo: reghdfe blur issue_divisions1_s vote vote_change government if issue != 10, cluster(party_id) absorb(election_id issue)
estimate store no_eco3

set scheme s1mono
coefplot base no_eu no_mc no_imm no_eco, bylabel(Salience (H1)) || base2 no_eu2 no_mc2 no_imm2 no_eco2, bylabel(Δ Position (H2)) || base3 no_eu3 no_mc3 no_imm3 no_eco3, bylabel(Blur (H3)) ||, keep(issue_divisions1_s) legend(pos(6) row(1)) byopts(cols(3) xrescale title("CHES divisions indicator", size(medium))) levels(90) mlabel(cond(@pval<.001, string(@b, "%9.2fc") + "***", ///
cond(@pval<.01, string(@b, "%9.2fc") + "**" , ///
cond(@pval<.05, string(@b, "%9.2fc") + "*"  , ///
cond(@pval<.1, string(@b, "%9.2fc") + "+", ///
string(@b, "%9.2fc")))))) ///
mlabposition(12) grid(none) color(blue) ciopts(lcolor(dknavy))
//addplot 1: , xline(0) norescaling legend(off) 
//addplot 2: , xline(0) norescaling legend(off)
addplot 3: , xline(0) norescaling legend(off)

graph save "g1", replace

graph combine "g1", caption("90% CIs; + p < 0.1, * p < 0.05, ** p < 0.01, *** p < 0.001", position(5) justification(right) size(vsmall)) 

graph export "figb4.png", replace

* Figure B5
use "Keeping the team together_data_stacked2.dta", clear

eststo clear
eststo: reghdfe salience issue_divisions2_s vote vote_change government, cluster(party_id) absorb(election_id issue)
estimate store base
eststo: reghdfe salience issue_divisions2_s vote vote_change government if issue != 2, cluster(party_id) absorb(election_id issue)
estimate store no_eu
eststo: reghdfe salience issue_divisions2_s vote vote_change government if issue != 4, cluster(party_id) absorb(election_id issue)
estimate store no_mc
eststo: reghdfe salience issue_divisions2_s vote vote_change government if issue != 6, cluster(party_id) absorb(election_id issue)
estimate store no_env
eststo: reghdfe salience issue_divisions2_s vote vote_change government if issue != 7, cluster(party_id) absorb(election_id issue)
estimate store no_red
eststo: reghdfe salience issue_divisions2_s vote vote_change government if issue != 8, cluster(party_id) absorb(election_id issue)
estimate store no_law
eststo: reghdfe salience issue_divisions2_s vote vote_change government if issue != 9, cluster(party_id) absorb(election_id issue)
estimate store no_ssm

eststo: reghdfe abs_position_change issue_divisions2_s vote vote_change government, cluster(party_id) absorb(election_id issue)
estimate store base2
eststo: reghdfe abs_position_change issue_divisions2_s vote vote_change government if issue != 2, cluster(party_id) absorb(election_id issue)
estimate store no_eu2
eststo: reghdfe abs_position_change issue_divisions2_s vote vote_change government if issue != 4, cluster(party_id) absorb(election_id issue)
estimate store no_mc2
eststo: reghdfe abs_position_change issue_divisions2_s vote vote_change government if issue != 6, cluster(party_id) absorb(election_id issue)
estimate store no_env2
eststo: reghdfe abs_position_change issue_divisions2_s vote vote_change government if issue != 7, cluster(party_id) absorb(election_id issue)
estimate store no_red2
eststo: reghdfe abs_position_change issue_divisions2_s vote vote_change government if issue != 8, cluster(party_id) absorb(election_id issue)
estimate store no_law2
eststo: reghdfe abs_position_change issue_divisions2_s vote vote_change government if issue != 9, cluster(party_id) absorb(election_id issue)
estimate store no_ssm2

eststo: reghdfe blur issue_divisions2_s vote vote_change government, cluster(party_id) absorb(election_id issue)
estimate store base3
eststo: reghdfe blur issue_divisions2_s vote vote_change government if issue != 2, cluster(party_id) absorb(election_id issue)
estimate store no_eu3
eststo: reghdfe blur issue_divisions2_s vote vote_change government if issue != 4, cluster(party_id) absorb(election_id issue)
estimate store no_mc3
eststo: reghdfe blur issue_divisions2_s vote vote_change government if issue != 6, cluster(party_id) absorb(election_id issue)
estimate store no_env3
eststo: reghdfe blur issue_divisions2_s vote vote_change government if issue != 7, cluster(party_id) absorb(election_id issue)
estimate store no_red3
eststo: reghdfe blur issue_divisions2_s vote vote_change government if issue != 8, cluster(party_id) absorb(election_id issue)
estimate store no_law3
eststo: reghdfe blur issue_divisions2_s vote vote_change government if issue != 9, cluster(party_id) absorb(election_id issue)
estimate store no_ssm3

set scheme s1mono
coefplot base no_eu no_mc no_env no_red no_law no_ssm, bylabel(Salience (H1)) || base2 no_eu2 no_mc2 no_env2 no_red2 no_law2 no_ssm2, bylabel(Δ Position (H2)) || base3 no_eu3 no_mc3 no_env3 no_red3 no_law3 no_ssm3, bylabel(Blur (H3)) ||, keep(issue_divisions2_s) legend(pos(6) row(1)) byopts(cols(3) xrescale title("CCS divisions indicator", size(medium))) levels(90) mlabel(cond(@pval<.001, string(@b, "%9.2fc") + "***", ///
cond(@pval<.01, string(@b, "%9.2fc") + "**" , ///
cond(@pval<.05, string(@b, "%9.2fc") + "*"  , ///
cond(@pval<.1, string(@b, "%9.2fc") + "+", ///
string(@b, "%9.2fc")))))) ///
mlabposition(12) grid(none) color(blue) ciopts(lcolor(dknavy))
//addplot 1: , xline(0) norescaling legend(off) 
addplot 2: , xline(0) norescaling legend(off)
addplot 3: , xline(0) norescaling legend(off)

graph save "g1", replace

graph combine "g1", caption("90% CIs; + p < 0.1, * p < 0.05, ** p < 0.01, *** p < 0.001", position(5) justification(right) size(vsmall)) 

graph export "figb5.png", replace

* Figure B6
use "Keeping the team together_data_stacked2.dta", clear

eststo clear
eststo: reghdfe salience issue_divisions1_s vote vote_change government, cluster(party_id) absorb(election_id issue)
estimate store base
eststo: reghdfe salience issue_divisions1_s vote vote_change government if year != 2002, cluster(party_id) absorb(election_id issue)
estimate store no_2002
eststo: reghdfe salience issue_divisions1_s vote vote_change government if year != 2006, cluster(party_id) absorb(election_id issue)
estimate store no_2006
eststo: reghdfe salience issue_divisions1_s vote vote_change government if year != 2010, cluster(party_id) absorb(election_id issue)
estimate store no_2010
eststo: reghdfe salience issue_divisions1_s vote vote_change government if year != 2014, cluster(party_id) absorb(election_id issue)
estimate store no_2014
eststo: reghdfe salience issue_divisions1_s vote vote_change government if year != 2019, cluster(party_id) absorb(election_id issue)
estimate store no_2019
eststo: reghdfe salience issue_divisions1_s vote vote_change government if year != 2024, cluster(party_id) absorb(election_id issue)
estimate store no_2024

eststo: reghdfe abs_position_change issue_divisions1_s vote vote_change government, cluster(party_id) absorb(election_id issue)
estimate store baseb
eststo: reghdfe abs_position_change issue_divisions1_s vote vote_change government if year != 2002, cluster(party_id) absorb(election_id issue)
estimate store no_2002b
eststo: reghdfe abs_position_change issue_divisions1_s vote vote_change government if year != 2006, cluster(party_id) absorb(election_id issue)
estimate store no_2006b
eststo: reghdfe abs_position_change issue_divisions1_s vote vote_change government if year != 2010, cluster(party_id) absorb(election_id issue)
estimate store no_2010b
eststo: reghdfe abs_position_change issue_divisions1_s vote vote_change government if year != 2014, cluster(party_id) absorb(election_id issue)
estimate store no_2014b
eststo: reghdfe abs_position_change issue_divisions1_s vote vote_change government if year != 2019, cluster(party_id) absorb(election_id issue)
estimate store no_2019b
eststo: reghdfe abs_position_change issue_divisions1_s vote vote_change government if year != 2024, cluster(party_id) absorb(election_id issue)
estimate store no_2024b

eststo: reghdfe blur issue_divisions1_s vote vote_change government, cluster(party_id) absorb(election_id issue)
estimate store basec
eststo: reghdfe blur issue_divisions1_s vote vote_change government if year != 2002, cluster(party_id) absorb(election_id issue)
estimate store no_2002c
eststo: reghdfe blur issue_divisions1_s vote vote_change government if year != 2006, cluster(party_id) absorb(election_id issue)
estimate store no_2006c
eststo: reghdfe blur issue_divisions1_s vote vote_change government if year != 2010, cluster(party_id) absorb(election_id issue)
estimate store no_2010c
eststo: reghdfe blur issue_divisions1_s vote vote_change government if year != 2014, cluster(party_id) absorb(election_id issue)
estimate store no_2014c
eststo: reghdfe blur issue_divisions1_s vote vote_change government if year != 2019, cluster(party_id) absorb(election_id issue)
estimate store no_2019c
eststo: reghdfe blur issue_divisions1_s vote vote_change government if year != 2024, cluster(party_id) absorb(election_id issue)
estimate store no_2024c

set scheme s1mono
coefplot base no_2002 no_2006 no_2010 no_2014 no_2019 no_2024, bylabel(Salience (H1)) ||  baseb no_2002b no_2006b no_2010b no_2014b no_2019b no_2024b, bylabel(Δ Position (H2)) ||  basec no_2002c no_2006c no_2010c no_2014c no_2019c no_2024c, bylabel(Blur (H3)) ||, keep(issue_divisions1_s) legend(pos(6) row(2)) byopts(cols(3) xrescale title("CHES divisions indicator", size(medium))) levels(90) mlabel(cond(@pval<.001, string(@b, "%9.2fc") + "***", ///
cond(@pval<.01, string(@b, "%9.2fc") + "**" , ///
cond(@pval<.05, string(@b, "%9.2fc") + "*"  , ///
cond(@pval<.1, string(@b, "%9.2fc") + "+", ///
string(@b, "%9.2fc")))))) ///
mlabposition(12) grid(none) color(blue) ciopts(lcolor(dknavy))
//addplot 1: , xline(0) norescaling legend(off) 
//addplot 2: , xline(0) norescaling legend(off)
//addplot 3: , xline(0) norescaling legend(off)

graph save "g1", replace

graph combine "g1", caption("90% CIs; + p < 0.1, * p < 0.05, ** p < 0.01, *** p < 0.001", position(5) justification(right) size(vsmall)) 

graph export "figb6.png", replace

* Figure B7
use "Keeping the team together_data_stacked2.dta", clear

eststo clear
eststo: reghdfe salience issue_divisions2_s vote vote_change government, cluster(party_id) absorb(election_id issue)
estimate store base
eststo: reghdfe salience issue_divisions2_s vote vote_change government if year != 2002, cluster(party_id) absorb(election_id issue)
estimate store no_2002
eststo: reghdfe salience issue_divisions2_s vote vote_change government if year != 2006, cluster(party_id) absorb(election_id issue)
estimate store no_2006
eststo: reghdfe salience issue_divisions2_s vote vote_change government if year != 2010, cluster(party_id) absorb(election_id issue)
estimate store no_2010
eststo: reghdfe salience issue_divisions2_s vote vote_change government if year != 2014, cluster(party_id) absorb(election_id issue)
estimate store no_2014
eststo: reghdfe salience issue_divisions2_s vote vote_change government if year != 2019, cluster(party_id) absorb(election_id issue)
estimate store no_2019
eststo: reghdfe salience issue_divisions2_s vote vote_change government if year != 2024, cluster(party_id) absorb(election_id issue)
estimate store no_2024

eststo: reghdfe abs_position_change issue_divisions2_s vote vote_change government, cluster(party_id) absorb(election_id issue)
estimate store baseb
eststo: reghdfe abs_position_change issue_divisions2_s vote vote_change government if year != 2002, cluster(party_id) absorb(election_id issue)
estimate store no_2002b
eststo: reghdfe abs_position_change issue_divisions2_s vote vote_change government if year != 2006, cluster(party_id) absorb(election_id issue)
estimate store no_2006b
eststo: reghdfe abs_position_change issue_divisions2_s vote vote_change government if year != 2010, cluster(party_id) absorb(election_id issue)
estimate store no_2010b
eststo: reghdfe abs_position_change issue_divisions2_s vote vote_change government if year != 2014, cluster(party_id) absorb(election_id issue)
estimate store no_2014b
eststo: reghdfe abs_position_change issue_divisions2_s vote vote_change government if year != 2019, cluster(party_id) absorb(election_id issue)
estimate store no_2019b
eststo: reghdfe abs_position_change issue_divisions2_s vote vote_change government if year != 2024, cluster(party_id) absorb(election_id issue)
estimate store no_2024b

eststo: reghdfe blur issue_divisions2_s vote vote_change government, cluster(party_id) absorb(election_id issue)
estimate store basec
eststo: reghdfe blur issue_divisions2_s vote vote_change government if year != 2002, cluster(party_id) absorb(election_id issue)
estimate store no_2002c
eststo: reghdfe blur issue_divisions2_s vote vote_change government if year != 2006, cluster(party_id) absorb(election_id issue)
estimate store no_2006c
eststo: reghdfe blur issue_divisions2_s vote vote_change government if year != 2010, cluster(party_id) absorb(election_id issue)
estimate store no_2010c
eststo: reghdfe blur issue_divisions2_s vote vote_change government if year != 2014, cluster(party_id) absorb(election_id issue)
estimate store no_2014c
eststo: reghdfe blur issue_divisions2_s vote vote_change government if year != 2019, cluster(party_id) absorb(election_id issue)
estimate store no_2019c
eststo: reghdfe blur issue_divisions2_s vote vote_change government if year != 2024, cluster(party_id) absorb(election_id issue)
estimate store no_2024c

set scheme s1mono
coefplot base no_2002 no_2006 no_2010 no_2014 no_2019 no_2024, bylabel(Salience (H1)) ||  baseb no_2002b no_2006b no_2010b no_2014b no_2019b no_2024b, bylabel(Δ Position (H2)) ||  basec no_2002c no_2006c no_2010c no_2014c no_2019c no_2024c, bylabel(Blur (H3)) ||,  keep(issue_divisions2_s) legend(pos(6) row(2)) byopts(cols(3) xrescale title("CCS divisions indicator", size(medium))) levels(90) mlabel(cond(@pval<.001, string(@b, "%9.2fc") + "***", ///
cond(@pval<.01, string(@b, "%9.2fc") + "**" , ///
cond(@pval<.05, string(@b, "%9.2fc") + "*"  , ///
cond(@pval<.1, string(@b, "%9.2fc") + "+", ///
string(@b, "%9.2fc")))))) ///
mlabposition(12) grid(none) color(blue) ciopts(lcolor(dknavy))
//addplot 1: , xline(0) norescaling legend(off) 
addplot 2: , xline(0) norescaling legend(off)
addplot 3: , xline(0) norescaling legend(off)

graph save "g1", replace

graph combine "g1", caption("90% CIs; + p < 0.1, * p < 0.05, ** p < 0.01, *** p < 0.001", position(5) justification(right) size(vsmall)) 

graph export "figb7.png", replace

* Figure B8
use "Keeping the team together_data_stacked2.dta", clear

eststo clear
eststo: reghdfe salience issue_divisions1_s vote vote_change government, cluster(party_id) absorb(election_id issue)
estimate store base
eststo: reghdfe salience issue_divisions1_s vote vote_change government if country != 1, cluster(party_id) absorb(election_id issue)
estimate store no_be
eststo: reghdfe salience issue_divisions1_s vote vote_change government if country != 2, cluster(party_id) absorb(election_id issue)
estimate store no_dk
eststo: reghdfe salience issue_divisions1_s vote vote_change government if country != 3, cluster(party_id) absorb(election_id issue)
estimate store no_ge
eststo: reghdfe salience issue_divisions1_s vote vote_change government if country != 4, cluster(party_id) absorb(election_id issue)
estimate store no_gr
eststo: reghdfe salience issue_divisions1_s vote vote_change government if country != 5, cluster(party_id) absorb(election_id issue)
estimate store no_esp
eststo: reghdfe salience issue_divisions1_s vote vote_change government if country != 6, cluster(party_id) absorb(election_id issue)
estimate store no_fr
eststo: reghdfe salience issue_divisions1_s vote vote_change government if country != 7, cluster(party_id) absorb(election_id issue)
estimate store no_irl
eststo: reghdfe salience issue_divisions1_s vote vote_change government if country != 8, cluster(party_id) absorb(election_id issue)
estimate store no_it
eststo: reghdfe salience issue_divisions1_s vote vote_change government if country != 10, cluster(party_id) absorb(election_id issue)
estimate store no_nl
eststo: reghdfe salience issue_divisions1_s vote vote_change government if country != 11, cluster(party_id) absorb(election_id issue)
estimate store no_uk
eststo: reghdfe salience issue_divisions1_s vote vote_change government if country != 12, cluster(party_id) absorb(election_id issue)
estimate store no_por
eststo: reghdfe salience issue_divisions1_s vote vote_change government if country != 13, cluster(party_id) absorb(election_id issue)
estimate store no_aus
eststo: reghdfe salience issue_divisions1_s vote vote_change government if country != 14, cluster(party_id) absorb(election_id issue)
estimate store no_fin
eststo: reghdfe salience issue_divisions1_s vote vote_change government if country != 16, cluster(party_id) absorb(election_id issue)
estimate store no_sv
eststo: reghdfe salience issue_divisions1_s vote vote_change government if country != 20, cluster(party_id) absorb(election_id issue)
estimate store no_bul
eststo: reghdfe salience issue_divisions1_s vote vote_change government if country != 21, cluster(party_id) absorb(election_id issue)
estimate store no_cz
eststo: reghdfe salience issue_divisions1_s vote vote_change government if country != 22, cluster(party_id) absorb(election_id issue)
estimate store no_est
eststo: reghdfe salience issue_divisions1_s vote vote_change government if country != 23, cluster(party_id) absorb(election_id issue)
estimate store no_hun
eststo: reghdfe salience issue_divisions1_s vote vote_change government if country != 24, cluster(party_id) absorb(election_id issue)
estimate store no_lat
eststo: reghdfe salience issue_divisions1_s vote vote_change government if country != 25, cluster(party_id) absorb(election_id issue)
estimate store no_lith
eststo: reghdfe salience issue_divisions1_s vote vote_change government if country != 26, cluster(party_id) absorb(election_id issue)
estimate store no_pol
eststo: reghdfe salience issue_divisions1_s vote vote_change government if country != 27, cluster(party_id) absorb(election_id issue)
estimate store no_rom
eststo: reghdfe salience issue_divisions1_s vote vote_change government if country != 28, cluster(party_id) absorb(election_id issue)
estimate store no_slo
eststo: reghdfe salience issue_divisions1_s vote vote_change government if country != 29, cluster(party_id) absorb(election_id issue)
estimate store no_sle
eststo: reghdfe salience issue_divisions1_s vote vote_change government if country != 31, cluster(party_id) absorb(election_id issue)
estimate store no_cro
eststo: reghdfe salience issue_divisions1_s vote vote_change government if country != 37, cluster(party_id) absorb(election_id issue)
estimate store no_mal
eststo: reghdfe salience issue_divisions1_s vote vote_change government if country != 38, cluster(party_id) absorb(election_id issue)
estimate store no_lux
eststo: reghdfe salience issue_divisions1_s vote vote_change government if country != 39, cluster(party_id) absorb(election_id issue)
estimate store no_cyp

eststo: reghdfe abs_position_change issue_divisions1_s vote vote_change government, cluster(party_id) absorb(election_id issue)
estimate store base2
eststo: reghdfe abs_position_change issue_divisions1_s vote vote_change government if country != 1, cluster(party_id) absorb(election_id issue)
estimate store no_be2
eststo: reghdfe abs_position_change issue_divisions1_s vote vote_change government if country != 2, cluster(party_id) absorb(election_id issue)
estimate store no_dk2
eststo: reghdfe abs_position_change issue_divisions1_s vote vote_change government if country != 3, cluster(party_id) absorb(election_id issue)
estimate store no_ge2
eststo: reghdfe abs_position_change issue_divisions1_s vote vote_change government if country != 4, cluster(party_id) absorb(election_id issue)
estimate store no_gr2
eststo: reghdfe abs_position_change issue_divisions1_s vote vote_change government if country != 5, cluster(party_id) absorb(election_id issue)
estimate store no_esp2
eststo: reghdfe abs_position_change issue_divisions1_s vote vote_change government if country != 6, cluster(party_id) absorb(election_id issue)
estimate store no_fr2
eststo: reghdfe abs_position_change issue_divisions1_s vote vote_change government if country != 7, cluster(party_id) absorb(election_id issue)
estimate store no_irl2
eststo: reghdfe abs_position_change issue_divisions1_s vote vote_change government if country != 8, cluster(party_id) absorb(election_id issue)
estimate store no_it2
eststo: reghdfe abs_position_change issue_divisions1_s vote vote_change government if country != 10, cluster(party_id) absorb(election_id issue)
estimate store no_nl2
eststo: reghdfe abs_position_change issue_divisions1_s vote vote_change government if country != 11, cluster(party_id) absorb(election_id issue)
estimate store no_uk2
eststo: reghdfe abs_position_change issue_divisions1_s vote vote_change government if country != 12, cluster(party_id) absorb(election_id issue)
estimate store no_por2
eststo: reghdfe abs_position_change issue_divisions1_s vote vote_change government if country != 13, cluster(party_id) absorb(election_id issue)
estimate store no_aus2
eststo: reghdfe abs_position_change issue_divisions1_s vote vote_change government if country != 14, cluster(party_id) absorb(election_id issue)
estimate store no_fin2
eststo: reghdfe abs_position_change issue_divisions1_s vote vote_change government if country != 16, cluster(party_id) absorb(election_id issue)
estimate store no_sv2
eststo: reghdfe abs_position_change issue_divisions1_s vote vote_change government if country != 20, cluster(party_id) absorb(election_id issue)
estimate store no_bul2
eststo: reghdfe abs_position_change issue_divisions1_s vote vote_change government if country != 21, cluster(party_id) absorb(election_id issue)
estimate store no_cz2
eststo: reghdfe abs_position_change issue_divisions1_s vote vote_change government if country != 22, cluster(party_id) absorb(election_id issue)
estimate store no_est2
eststo: reghdfe abs_position_change issue_divisions1_s vote vote_change government if country != 23, cluster(party_id) absorb(election_id issue)
estimate store no_hun2
eststo: reghdfe abs_position_change issue_divisions1_s vote vote_change government if country != 24, cluster(party_id) absorb(election_id issue)
estimate store no_lat2
eststo: reghdfe abs_position_change issue_divisions1_s vote vote_change government if country != 25, cluster(party_id) absorb(election_id issue)
estimate store no_lith2
eststo: reghdfe abs_position_change issue_divisions1_s vote vote_change government if country != 26, cluster(party_id) absorb(election_id issue)
estimate store no_pol2
eststo: reghdfe abs_position_change issue_divisions1_s vote vote_change government if country != 27, cluster(party_id) absorb(election_id issue)
estimate store no_rom2
eststo: reghdfe abs_position_change issue_divisions1_s vote vote_change government if country != 28, cluster(party_id) absorb(election_id issue)
estimate store no_slo2
eststo: reghdfe abs_position_change issue_divisions1_s vote vote_change government if country != 29, cluster(party_id) absorb(election_id issue)
estimate store no_sle2
eststo: reghdfe abs_position_change issue_divisions1_s vote vote_change government if country != 31, cluster(party_id) absorb(election_id issue)
estimate store no_cro2
eststo: reghdfe abs_position_change issue_divisions1_s vote vote_change government if country != 37, cluster(party_id) absorb(election_id issue)
estimate store no_mal2
eststo: reghdfe abs_position_change issue_divisions1_s vote vote_change government if country != 38, cluster(party_id) absorb(election_id issue)
estimate store no_lux2
eststo: reghdfe abs_position_change issue_divisions1_s vote vote_change government if country != 39, cluster(party_id) absorb(election_id issue)
estimate store no_cyp2

eststo: reghdfe blur issue_divisions1_s vote vote_change government, cluster(party_id) absorb(election_id issue)
estimate store base3
eststo: reghdfe blur issue_divisions1_s vote vote_change government if country != 1, cluster(party_id) absorb(election_id issue)
estimate store no_be3
eststo: reghdfe blur issue_divisions1_s vote vote_change government if country != 2, cluster(party_id) absorb(election_id issue)
estimate store no_dk3
eststo: reghdfe blur issue_divisions1_s vote vote_change government if country != 3, cluster(party_id) absorb(election_id issue)
estimate store no_ge3
eststo: reghdfe blur issue_divisions1_s vote vote_change government if country != 4, cluster(party_id) absorb(election_id issue)
estimate store no_gr3
eststo: reghdfe blur issue_divisions1_s vote vote_change government if country != 5, cluster(party_id) absorb(election_id issue)
estimate store no_esp3
eststo: reghdfe blur issue_divisions1_s vote vote_change government if country != 6, cluster(party_id) absorb(election_id issue)
estimate store no_fr3
eststo: reghdfe blur issue_divisions1_s vote vote_change government if country != 7, cluster(party_id) absorb(election_id issue)
estimate store no_irl3
eststo: reghdfe blur issue_divisions1_s vote vote_change government if country != 8, cluster(party_id) absorb(election_id issue)
estimate store no_it3
eststo: reghdfe blur issue_divisions1_s vote vote_change government if country != 10, cluster(party_id) absorb(election_id issue)
estimate store no_nl3
eststo: reghdfe blur issue_divisions1_s vote vote_change government if country != 11, cluster(party_id) absorb(election_id issue)
estimate store no_uk3
eststo: reghdfe blur issue_divisions1_s vote vote_change government if country != 12, cluster(party_id) absorb(election_id issue)
estimate store no_por3
eststo: reghdfe blur issue_divisions1_s vote vote_change government if country != 13, cluster(party_id) absorb(election_id issue)
estimate store no_aus3
eststo: reghdfe blur issue_divisions1_s vote vote_change government if country != 14, cluster(party_id) absorb(election_id issue)
estimate store no_fin3
eststo: reghdfe blur issue_divisions1_s vote vote_change government if country != 16, cluster(party_id) absorb(election_id issue)
estimate store no_sv3
eststo: reghdfe blur issue_divisions1_s vote vote_change government if country != 20, cluster(party_id) absorb(election_id issue)
estimate store no_bul3
eststo: reghdfe blur issue_divisions1_s vote vote_change government if country != 21, cluster(party_id) absorb(election_id issue)
estimate store no_cz3
eststo: reghdfe blur issue_divisions1_s vote vote_change government if country != 22, cluster(party_id) absorb(election_id issue)
estimate store no_est3
eststo: reghdfe blur issue_divisions1_s vote vote_change government if country != 23, cluster(party_id) absorb(election_id issue)
estimate store no_hun3
eststo: reghdfe blur issue_divisions1_s vote vote_change government if country != 24, cluster(party_id) absorb(election_id issue)
estimate store no_lat3
eststo: reghdfe blur issue_divisions1_s vote vote_change government if country != 25, cluster(party_id) absorb(election_id issue)
estimate store no_lith3
eststo: reghdfe blur issue_divisions1_s vote vote_change government if country != 26, cluster(party_id) absorb(election_id issue)
estimate store no_pol3
eststo: reghdfe blur issue_divisions1_s vote vote_change government if country != 27, cluster(party_id) absorb(election_id issue)
estimate store no_rom3
eststo: reghdfe blur issue_divisions1_s vote vote_change government if country != 28, cluster(party_id) absorb(election_id issue)
estimate store no_slo3
eststo: reghdfe blur issue_divisions1_s vote vote_change government if country != 29, cluster(party_id) absorb(election_id issue)
estimate store no_sle3
eststo: reghdfe blur issue_divisions1_s vote vote_change government if country != 31, cluster(party_id) absorb(election_id issue)
estimate store no_cro3
eststo: reghdfe blur issue_divisions1_s vote vote_change government if country != 37, cluster(party_id) absorb(election_id issue)
estimate store no_mal3
eststo: reghdfe blur issue_divisions1_s vote vote_change government if country != 38, cluster(party_id) absorb(election_id issue)
estimate store no_lux3
eststo: reghdfe blur issue_divisions1_s vote vote_change government if country != 39, cluster(party_id) absorb(election_id issue)
estimate store no_cyp3

set scheme s1mono
coefplot base no_be no_dk no_ge no_gr no_esp no_fr no_irl no_it no_nl no_uk no_por no_aus no_fin no_sv no_bul no_cz no_est no_hun no_lat no_lith no_pol no_rom no_slo no_sle no_cro no_mal no_lux no_cyp, bylabel(Salience (H1)) ||  base2 no_be2 no_dk2 no_ge2 no_gr2 no_esp2 no_fr2 no_irl2 no_it2 no_nl2 no_uk2 no_por2 no_aus2 no_fin2 no_sv2 no_bul2 no_cz2 no_est2 no_hun2 no_lat2 no_lith2 no_pol2 no_rom2 no_slo2 no_sle2 no_cro2 no_mal2 no_lux2 no_cyp2, bylabel(Δ Position (H2)) ||  base3 no_be3 no_dk3 no_ge3 no_gr3 no_esp3 no_fr3 no_irl3 no_it3 no_nl3 no_uk3 no_por3 no_aus3 no_fin3 no_sv3 no_bul3 no_cz3 no_est3 no_hun3 no_lat3 no_lith3 no_pol3 no_rom3 no_slo3 no_sle3 no_cro3 no_mal3 no_lux3 no_cyp3, bylabel(Blur (H3)) ||, keep(issue_divisions1_s) legend(pos(6) row(4)) byopts(cols(3) xrescale title("CHES divisions indicator", size(medium))) levels(90) mlabposition(12) grid(none) color(blue) ciopts(lcolor(dknavy))
//addplot 1: , xline(0) norescaling legend(off) 
//addplot 2: , xline(0) norescaling legend(off)
//addplot 3: , xline(0) norescaling legend(off)

graph save "g1", replace

graph combine "g1", caption("90% CIs", position(5) justification(right) size(vsmall)) 

graph export "figb8.png", replace

* Figure B9
use "Keeping the team together_data_stacked2.dta", clear

eststo clear
eststo: reghdfe salience issue_divisions2_s vote vote_change government, cluster(party_id) absorb(election_id issue)
estimate store base
eststo: reghdfe salience issue_divisions2_s vote vote_change government if country != 1, cluster(party_id) absorb(election_id issue)
estimate store no_be
eststo: reghdfe salience issue_divisions2_s vote vote_change government if country != 2, cluster(party_id) absorb(election_id issue)
estimate store no_dk
eststo: reghdfe salience issue_divisions2_s vote vote_change government if country != 3, cluster(party_id) absorb(election_id issue)
estimate store no_ge
eststo: reghdfe salience issue_divisions2_s vote vote_change government if country != 4, cluster(party_id) absorb(election_id issue)
estimate store no_gr
eststo: reghdfe salience issue_divisions2_s vote vote_change government if country != 5, cluster(party_id) absorb(election_id issue)
estimate store no_esp
eststo: reghdfe salience issue_divisions2_s vote vote_change government if country != 7, cluster(party_id) absorb(election_id issue)
estimate store no_irl
eststo: reghdfe salience issue_divisions2_s vote vote_change government if country != 8, cluster(party_id) absorb(election_id issue)
estimate store no_it
eststo: reghdfe salience issue_divisions2_s vote vote_change government if country != 10, cluster(party_id) absorb(election_id issue)
estimate store no_nl
eststo: reghdfe salience issue_divisions2_s vote vote_change government if country != 11, cluster(party_id) absorb(election_id issue)
estimate store no_uk
eststo: reghdfe salience issue_divisions2_s vote vote_change government if country != 12, cluster(party_id) absorb(election_id issue)
estimate store no_por
eststo: reghdfe salience issue_divisions2_s vote vote_change government if country != 13, cluster(party_id) absorb(election_id issue)
estimate store no_aus
eststo: reghdfe salience issue_divisions2_s vote vote_change government if country != 14, cluster(party_id) absorb(election_id issue)
estimate store no_fin
eststo: reghdfe salience issue_divisions2_s vote vote_change government if country != 16, cluster(party_id) absorb(election_id issue)
estimate store no_sv
eststo: reghdfe salience issue_divisions2_s vote vote_change government if country != 21, cluster(party_id) absorb(election_id issue)
estimate store no_cz
eststo: reghdfe salience issue_divisions2_s vote vote_change government if country != 22, cluster(party_id) absorb(election_id issue)
estimate store no_est
eststo: reghdfe salience issue_divisions2_s vote vote_change government if country != 23, cluster(party_id) absorb(election_id issue)
estimate store no_hun
eststo: reghdfe salience issue_divisions2_s vote vote_change government if country != 27, cluster(party_id) absorb(election_id issue)
estimate store no_rom

eststo: reghdfe abs_position_change issue_divisions2_s vote vote_change government, cluster(party_id) absorb(election_id issue)
estimate store base2
eststo: reghdfe abs_position_change issue_divisions2_s vote vote_change government if country != 1, cluster(party_id) absorb(election_id issue)
estimate store no_be2
eststo: reghdfe abs_position_change issue_divisions2_s vote vote_change government if country != 2, cluster(party_id) absorb(election_id issue)
estimate store no_dk2
eststo: reghdfe abs_position_change issue_divisions2_s vote vote_change government if country != 3, cluster(party_id) absorb(election_id issue)
estimate store no_ge2
eststo: reghdfe abs_position_change issue_divisions2_s vote vote_change government if country != 4, cluster(party_id) absorb(election_id issue)
estimate store no_gr2
eststo: reghdfe abs_position_change issue_divisions2_s vote vote_change government if country != 5, cluster(party_id) absorb(election_id issue)
estimate store no_esp2
eststo: reghdfe abs_position_change issue_divisions2_s vote vote_change government if country != 7, cluster(party_id) absorb(election_id issue)
estimate store no_irl2
eststo: reghdfe abs_position_change issue_divisions2_s vote vote_change government if country != 8, cluster(party_id) absorb(election_id issue)
estimate store no_it2
eststo: reghdfe abs_position_change issue_divisions2_s vote vote_change government if country != 10, cluster(party_id) absorb(election_id issue)
estimate store no_nl2
eststo: reghdfe abs_position_change issue_divisions2_s vote vote_change government if country != 11, cluster(party_id) absorb(election_id issue)
estimate store no_uk2
eststo: reghdfe abs_position_change issue_divisions2_s vote vote_change government if country != 12, cluster(party_id) absorb(election_id issue)
estimate store no_por2
eststo: reghdfe abs_position_change issue_divisions2_s vote vote_change government if country != 13, cluster(party_id) absorb(election_id issue)
estimate store no_aus2
eststo: reghdfe abs_position_change issue_divisions2_s vote vote_change government if country != 14, cluster(party_id) absorb(election_id issue)
estimate store no_fin2
eststo: reghdfe abs_position_change issue_divisions2_s vote vote_change government if country != 16, cluster(party_id) absorb(election_id issue)
estimate store no_sv2
eststo: reghdfe abs_position_change issue_divisions2_s vote vote_change government if country != 21, cluster(party_id) absorb(election_id issue)
estimate store no_cz2
eststo: reghdfe abs_position_change issue_divisions2_s vote vote_change government if country != 22, cluster(party_id) absorb(election_id issue)
estimate store no_est2
eststo: reghdfe abs_position_change issue_divisions2_s vote vote_change government if country != 23, cluster(party_id) absorb(election_id issue)
estimate store no_hun2
eststo: reghdfe abs_position_change issue_divisions2_s vote vote_change government if country != 27, cluster(party_id) absorb(election_id issue)
estimate store no_rom2

eststo: reghdfe blur issue_divisions2_s vote vote_change government, cluster(party_id) absorb(election_id issue)
estimate store base3
eststo: reghdfe blur issue_divisions2_s vote vote_change government if country != 1, cluster(party_id) absorb(election_id issue)
estimate store no_be3
eststo: reghdfe blur issue_divisions2_s vote vote_change government if country != 2, cluster(party_id) absorb(election_id issue)
estimate store no_dk3
eststo: reghdfe blur issue_divisions2_s vote vote_change government if country != 3, cluster(party_id) absorb(election_id issue)
estimate store no_ge3
eststo: reghdfe blur issue_divisions2_s vote vote_change government if country != 4, cluster(party_id) absorb(election_id issue)
estimate store no_gr3
eststo: reghdfe blur issue_divisions2_s vote vote_change government if country != 5, cluster(party_id) absorb(election_id issue)
estimate store no_esp3
eststo: reghdfe blur issue_divisions2_s vote vote_change government if country != 7, cluster(party_id) absorb(election_id issue)
estimate store no_irl3
eststo: reghdfe blur issue_divisions2_s vote vote_change government if country != 8, cluster(party_id) absorb(election_id issue)
estimate store no_it3
eststo: reghdfe blur issue_divisions2_s vote vote_change government if country != 10, cluster(party_id) absorb(election_id issue)
estimate store no_nl3
eststo: reghdfe blur issue_divisions2_s vote vote_change government if country != 11, cluster(party_id) absorb(election_id issue)
estimate store no_uk3
eststo: reghdfe blur issue_divisions2_s vote vote_change government if country != 12, cluster(party_id) absorb(election_id issue)
estimate store no_por3
eststo: reghdfe blur issue_divisions2_s vote vote_change government if country != 13, cluster(party_id) absorb(election_id issue)
estimate store no_aus3
eststo: reghdfe blur issue_divisions2_s vote vote_change government if country != 14, cluster(party_id) absorb(election_id issue)
estimate store no_fin3
eststo: reghdfe blur issue_divisions2_s vote vote_change government if country != 16, cluster(party_id) absorb(election_id issue)
estimate store no_sv3
eststo: reghdfe blur issue_divisions2_s vote vote_change government if country != 21, cluster(party_id) absorb(election_id issue)
estimate store no_cz3
eststo: reghdfe blur issue_divisions2_s vote vote_change government if country != 22, cluster(party_id) absorb(election_id issue)
estimate store no_est3
eststo: reghdfe blur issue_divisions2_s vote vote_change government if country != 23, cluster(party_id) absorb(election_id issue)
estimate store no_hun3
eststo: reghdfe blur issue_divisions2_s vote vote_change government if country != 27, cluster(party_id) absorb(election_id issue)
estimate store no_rom3

set scheme s1mono
coefplot base no_be no_dk no_ge no_gr no_esp no_irl no_it no_nl no_uk no_por no_aus no_fin no_sv no_cz no_est no_hun no_rom, bylabel(Salience (H1)) ||  base2 no_be2 no_dk2 no_ge2 no_gr2 no_esp2 no_irl2 no_it2 no_nl2 no_uk2 no_por2 no_aus2 no_fin2 no_sv2 no_cz2 no_est2 no_hun2 no_rom2, bylabel(Δ Position (H2)) ||  base3 no_be3 no_dk3 no_ge3 no_gr3 no_esp3 no_irl3 no_it3 no_nl3 no_uk3 no_por3 no_aus3 no_fin3 no_sv3 no_cz3 no_est3 no_hun3 no_rom3, bylabel(Blur (H3)) ||, keep(issue_divisions2_s) legend(pos(6) row(3)) byopts(cols(3) xrescale title("CCS divisions indicator", size(medium))) levels(90) mlabposition(12) grid(none) color(blue) ciopts(lcolor(dknavy))
//addplot 1: , xline(0) norescaling legend(off) 
addplot 2: , xline(0) norescaling legend(off)
addplot 3: , xline(0) norescaling legend(off)

graph save "g1", replace

graph combine "g1", caption("90% CIs", position(5) justification(right) size(vsmall)) 

graph export "figb9.png", replace

* Figure B10
use "Keeping the team together_data_stacked2.dta", clear

eststo clear

eststo: reghdfe salience issue_divisions1_s vote vote_change government, cluster(party_id) absorb(election_id issue)
estimate store election_issue1
eststo: reghdfe salience issue_divisions2_s vote vote_change government, cluster(party_id) absorb(election_id issue)
estimate store election_issue2
eststo: reghdfe salience issue_divisions1_s vote vote_change government, cluster(party_id) absorb(election_id issue family)
estimate store family_election_issue1
eststo: reghdfe salience issue_divisions2_s vote vote_change government, cluster(party_id) absorb(election_id issue family)
estimate store family_election_issue2
eststo: reghdfe salience issue_divisions1_s vote vote_change government, cluster(party_id) absorb(country)
estimate store country1
eststo: reghdfe salience issue_divisions2_s vote vote_change government, cluster(party_id) absorb(country)
estimate store country2
eststo: reghdfe salience issue_divisions1_s vote vote_change government, cluster(party_id) absorb(country year)
estimate store country_year1
eststo: reghdfe salience issue_divisions2_s vote vote_change government, cluster(party_id) absorb(country year)
estimate store country_year2
eststo: reghdfe salience issue_divisions1_s vote vote_change government, cluster(party_id) absorb(party_id)
estimate store party1
eststo: reghdfe salience issue_divisions2_s vote vote_change government, cluster(party_id) absorb(party_id)
estimate store party2
eststo: reghdfe salience issue_divisions1_s vote vote_change government, cluster(party_id) absorb(party_id year)
estimate store party_year1
eststo: reghdfe salience issue_divisions2_s vote vote_change government, cluster(party_id) absorb(party_id year)
estimate store party_year2

eststo: reghdfe abs_position_change issue_divisions1_s vote vote_change government, cluster(party_id) absorb(election_id issue)
estimate store election_issue1b
eststo: reghdfe abs_position_change issue_divisions2_s vote vote_change government, cluster(party_id) absorb(election_id issue)
estimate store election_issue2b
eststo: reghdfe abs_position_change issue_divisions1_s vote vote_change government, cluster(party_id) absorb(election_id issue family)
estimate store family_election_issue1b
eststo: reghdfe abs_position_change issue_divisions2_s vote vote_change government, cluster(party_id) absorb(election_id issue family)
estimate store family_election_issue2b
eststo: reghdfe abs_position_change issue_divisions1_s vote vote_change government, cluster(party_id) absorb(country)
estimate store country1b
eststo: reghdfe abs_position_change issue_divisions2_s vote vote_change government, cluster(party_id) absorb(country)
estimate store country2b
eststo: reghdfe abs_position_change issue_divisions1_s vote vote_change government, cluster(party_id) absorb(country year)
estimate store country_year1b
eststo: reghdfe abs_position_change issue_divisions2_s vote vote_change government, cluster(party_id) absorb(country year)
estimate store country_year2b
eststo: reghdfe abs_position_change issue_divisions1_s vote vote_change government, cluster(party_id) absorb(party_id)
estimate store party1b
eststo: reghdfe abs_position_change issue_divisions2_s vote vote_change government, cluster(party_id) absorb(party_id)
estimate store party2b
eststo: reghdfe abs_position_change issue_divisions1_s vote vote_change government, cluster(party_id) absorb(party_id year)
estimate store party_year1b
eststo: reghdfe abs_position_change issue_divisions2_s vote vote_change government, cluster(party_id) absorb(party_id year)
estimate store party_year2b

eststo: reghdfe blur issue_divisions1_s vote vote_change government, cluster(party_id) absorb(election_id issue)
estimate store election_issue1c
eststo: reghdfe blur issue_divisions2_s vote vote_change government, cluster(party_id) absorb(election_id issue)
estimate store election_issue2c
eststo: reghdfe blur issue_divisions1_s vote vote_change government, cluster(party_id) absorb(election_id issue family)
estimate store family_election_issue1c
eststo: reghdfe blur issue_divisions2_s vote vote_change government, cluster(party_id) absorb(election_id issue family)
estimate store family_election_issue2c
eststo: reghdfe blur issue_divisions1_s vote vote_change government, cluster(party_id) absorb(country)
estimate store country1c
eststo: reghdfe blur issue_divisions2_s vote vote_change government, cluster(party_id) absorb(country)
estimate store country2c
eststo: reghdfe blur issue_divisions1_s vote vote_change government, cluster(party_id) absorb(country year)
estimate store country_year1c
eststo: reghdfe blur issue_divisions2_s vote vote_change government, cluster(party_id) absorb(country year)
estimate store country_year2c
eststo: reghdfe blur issue_divisions1_s vote vote_change government, cluster(party_id) absorb(party_id)
estimate store party1c
eststo: reghdfe blur issue_divisions2_s vote vote_change government, cluster(party_id) absorb(party_id)
estimate store party2c
eststo: reghdfe blur issue_divisions1_s vote vote_change government, cluster(party_id) absorb(party_id year)
estimate store party_year1c
eststo: reghdfe blur issue_divisions2_s vote vote_change government, cluster(party_id) absorb(party_id year)
estimate store party_year2c

set scheme s1mono
coefplot election_issue1 election_issue2 family_election_issue1 family_election_issue2 country1 country2 party1 party2 country_year1 country_year2 party_year1 party_year2, bylabel(Salience (H1)) || election_issue1b election_issue2b family_election_issue1b family_election_issue2b country1b country2b party1b party2b country_year1b country_year2b party_year1b party_year2b, bylabel(Δ Position (H2)) || election_issue1c election_issue2c family_election_issue1c family_election_issue2c country1c country2c party1c party2c country_year1c country_year2c party_year1c party_year2c, bylabel(Blur (H3)) ||, keep(issue_divisions1_s issue_divisions2_s) legend(pos(6) row(4)) byopts(cols(3) xrescale) levels(90) mlabposition(12) grid(none) color(blue) ciopts(lcolor(dknavy))
//addplot 1: , xline(0) norescaling legend(off) 
addplot 2: , xline(0) norescaling legend(off)
//addplot 3: , xline(0) norescaling legend(off)

graph save "g1", replace

graph combine "g1", caption("90% CIs", position(5) justification(right) size(vsmall)) 

graph export "figb10.png", replace

* Appendix C - Additional analyses
* Figure C1

use "Keeping the team together_data2.dta", clear
eststo clear

eststo: reg eu_salience eu_dissent eu_dissent_sq vote vote_change government i.election_id
estimate store eu
eststo: reg immigrate_salience immigrate_dissent immigrate_dissent_sq vote vote_change government i.election_id
estimate store im
eststo: reg multicult_salience multicult_dissent multicult_dissent_sq vote vote_change government i.election_id
estimate store mc
eststo: reg lrecon_salience lrecon_dissent lrecon_dissent_sq vote vote_change government i.election_id
estimate store ec

* replace with lagged variables 

eststo: reg eu_position_change_abs eu_dissent eu_dissent_sq vote vote_change government i.election_id
estimate store eu2
eststo: reg immigration_position_change_abs immigrate_dissent immigrate_dissent_sq vote vote_change government i.election_id
estimate store im2
eststo: reg multicult_position_change_abs multicult_dissent multicult_dissent_sq vote vote_change government i.election_id
estimate store mc2
eststo: reg lrecon_position_change_abs lrecon_dissent lrecon_dissent_sq vote vote_change government i.election_id
estimate store ec2

use "Keeping the team together_data.dta", clear

eststo: qui: reg eu_blur_std eu_dissent eu_dissent_sq vote vote_change government i.election_id 
estimate store eu3
eststo: qui: reg immigrate_policy_blur_std immigrate_dissent immigrate_dissent_sq vote vote_change government i.election_id
estimate store im3
eststo: qui: reg multiculturalism_blur_std multicult_dissent multicult_dissent_sq vote vote_change government i.election_id
estimate store mc3
eststo: qui: reg lrecon_blur_std lrecon_dissent lrecon_dissent_sq vote vote_change government i.election_id
estimate store ec3

set scheme s1mono
coefplot eu mc im ec, bylabel(Salience (H1)) || eu2 mc2 im2 ec2, bylabel(Δ Position (H2)) || eu3 im3 mc3 ec3, bylabel(Blur (H3)) ||, keep(eu_dissent immigrate_dissent multicult_dissent lrecon_dissent eu_dissent_sq immigrate_dissent_sq multicult_dissent_sq lrecon_dissent_sq) order(eu_dissent immigrate_dissent multicult_dissent lrecon_dissent eu_dissent_sq immigrate_dissent_sq multicult_dissent_sq lrecon_dissent_sq) legend(pos(6) row(1)) byopts(cols(3) xrescale legend(off) title("CHES divisions indicator", size(medium))) levels(90) mlabel(cond(@pval<.001, string(@b, "%9.2fc") + "***", ///
cond(@pval<.01, string(@b, "%9.2fc") + "**" , ///
cond(@pval<.05, string(@b, "%9.2fc") + "*"  , ///
cond(@pval<.1, string(@b, "%9.2fc") + "+", ///
string(@b, "%9.2fc")))))) ///
mlabposition(12) grid(none) msymbol(s) color(blue) ciopts(lcolor(dknavy)) xline(0)

graph save "g1", replace

graph combine "g1", caption("90% CIs; + p < 0.1, * p < 0.05, ** p < 0.01, *** p < 0.001", position(5) justification(right) size(vsmall)) 

graph export "figc1a.png", replace

use "Keeping the team together_data2.dta", clear

eststo: qui: reg eu_salience eu_divisions_ccs eu_divisions_ccs_sq vote vote_change government i.election_id
estimate store eu
eststo: qui: reg multicult_salience multicult_divisions_ccs multicult_divisions_ccs_sq vote vote_change government i.election_id
estimate store mc
eststo: qui: reg enviro_salience environment_divisions_ccs environment_divisions_ccs_sq vote vote_change government i.election_id
estimate store ev
eststo: qui: reg redist_salience redist_divisions_ccs redist_divisions_ccs_sq vote vote_change government i.election_id
estimate store rd
eststo: qui: reg civlib_salience order_divisions_ccs order_divisions_ccs_sq vote vote_change government i.election_id
estimate store cl
eststo: qui: reg social_salience ssm_divisions_ccs ssm_divisions_ccs_sq vote vote_change government i.election_id
estimate store sl

eststo: qui: reg eu_position_change_abs eu_divisions_ccs eu_divisions_ccs_sq vote vote_change government i.election_id
estimate store eu2
eststo: qui: reg multicult_position_change_abs multicult_divisions_ccs multicult_divisions_ccs_sq vote vote_change government i.election_id
estimate store mc2
eststo: qui: reg environment_position_change_abs environment_divisions_ccs environment_divisions_ccs_sq vote vote_change government i.election_id
estimate store ev2
eststo: qui: reg redist_position_change_abs redist_divisions_ccs redist_divisions_ccs_sq vote vote_change government i.election_id
estimate store rd2
eststo: qui: reg civlib_position_change_abs order_divisions_ccs order_divisions_ccs_sq vote vote_change government i.election_id
estimate store cl2
eststo: qui: reg social_position_change_abs ssm_divisions_ccs ssm_divisions_ccs_sq vote vote_change government i.election_id
estimate store sl2

eststo: qui: reg eu_blur_std eu_divisions_ccs eu_divisions_ccs_sq vote vote_change government i.election_id
estimate store eu3
eststo: qui: reg multiculturalism_blur_std multicult_divisions_ccs multicult_divisions_ccs_sq vote vote_change government i.election_id
estimate store mc3
eststo: qui: reg environment_blur_std environment_divisions_ccs environment_divisions_ccs_sq vote vote_change government i.election_id
estimate store ev3
eststo: qui: reg redistribution_blur_std redist_divisions_ccs redist_divisions_ccs_sq vote vote_change government i.election_id
estimate store rd3
eststo: qui: reg civlib_laworder_blur_std order_divisions_ccs order_divisions_ccs_sq vote vote_change government i.election_id
estimate store cl3
eststo: qui: reg sociallifestyle_blur_std ssm_divisions_ccs ssm_divisions_ccs_sq vote vote_change government i.election_id
estimate store sl3

set scheme s1mono
coefplot eu mc ev rd cl sl, bylabel(Salience (H1))  || eu2 mc2 ev2 rd2 cl2 sl2, bylabel(Δ Position (H2))  || eu3 mc3 ev3 rd3 cl3 sl3, bylabel(Blur (H3)) ||, xline(0) keep(eu_divisions_ccs eu_divisions_ccs_sq multicult_divisions_ccs multicult_divisions_ccs_sq environment_divisions_ccs environment_divisions_ccs_sq redist_divisions_ccs  redist_divisions_ccs_sq order_divisions_ccs order_divisions_ccs_sq ssm_divisions_ccs ssm_divisions_ccs_sq) order(eu_divisions_ccs multicult_divisions_ccs environment_divisions_ccs redist_divisions_ccs order_divisions_ccs ssm_divisions_ccs eu_divisions_ccs_sq multicult_divisions_ccs_sq environment_divisions_ccs_sq redist_divisions_ccs_sq order_divisions_ccs_sq ssm_divisions_ccs_sq) legend(pos(6) row(1)) byopts(cols(3) xrescale legend(off) title("CCS divisions indicator", size(medium))) levels(90) mlabel(cond(@pval<.001, string(@b, "%9.2fc") + "***", ///
cond(@pval<.01, string(@b, "%9.2fc") + "**" , ///
cond(@pval<.05, string(@b, "%9.2fc") + "*"  , ///
cond(@pval<.1, string(@b, "%9.2fc") + "+", ///
string(@b, "%9.2fc")))))) ///
mlabposition(12) grid(none) msymbol(s) color(blue) ciopts(lcolor(dknavy))
*addplot 1: , xline(0) norescaling legend(off)
*addplot 2: , xline(0) norescaling legend(off)

graph save "g1", replace

graph combine "g1", caption("90% CIs; + p < 0.1, * p < 0.05, ** p < 0.01, *** p < 0.001", position(5) justification(right) size(vsmall)) 

graph export "figc1b.png", replace

* Table C1 - control for the other DVs
use "Keeping the team together_data_stacked2.dta", clear

eststo clear
// H1
eststo: reghdfe salience issue_divisions1_s abs_position_change blur vote vote_change government, cluster(party_id) absorb(election_id issue)
estadd local election "Yes"
estadd local issue "Yes"
estadd local cluster "Yes"
eststo: reghdfe salience issue_divisions2_s abs_position_change blur vote vote_change government, cluster(party_id) absorb(election_id issue)
estadd local election "Yes"
estadd local issue "Yes"
estadd local cluster "Yes"
// H2
eststo: reghdfe abs_position_change issue_divisions1_s salience blur vote vote_change government, cluster(party_id) absorb(election_id issue)
estadd local election "Yes"
estadd local issue "Yes"
estadd local cluster "Yes"
eststo: reghdfe abs_position_change issue_divisions2_s salience blur vote vote_change government, cluster(party_id) absorb(election_id issue)
estadd local election "Yes"
estadd local issue "Yes"
estadd local cluster "Yes"
// H3
eststo: reghdfe blur issue_divisions1_s salience abs_position_change vote vote_change government, cluster(party_id) absorb(election_id issue)
estadd local election "Yes"
estadd local issue "Yes"
estadd local cluster "Yes"
eststo: reghdfe blur issue_divisions2_s salience abs_position_change vote vote_change government, cluster(party_id) absorb(election_id issue) 
estadd local election "Yes"
estadd local issue "Yes"
estadd local cluster "Yes"

esttab using TableC1.rtf, replace label varwidth(16) se modelwidth(5) compress nogap onecell stats(N election issue cluster, fmt(a2) label ("Observations" "Election FEs" "Issue FEs" "Clustered SEs")) star (+ 0.1 * 0.05 ** 0.01 *** 0.001) nonumbers mtitles(H1 H1 H2 H2 H3 H3 H4 H4) note("Notes: Pooled multivariate regression models of the relationship between intra-party divisions and salience (H1), position change (H2), and blurring (H3). Models 1, 3, and 5 use the CHES division indicator and models 2, 4, and 6 use the CCS division indicator. The two indicators are standardized. Clustered standard errors in parentheses.") b(%9.3fc) order(issue_divisions1_s issue_divisions2_s salience abs_position_change blur vote vote_change government _cons) keep(issue_divisions1_s issue_divisions2_s salience abs_position_change blur vote vote_change government _cons)

* Figure C2
use "Keeping the team together_data_stacked2.dta", clear

set scheme plotplain
eststo clear

eststo: reghdfe abs_position_change issue_divisions1_s salience vote vote_change government c.salience#c.issue_divisions1_s, cluster(party_id) absorb(election_id issue)
keep if e(sample) == 1
margins, dydx(issue_divisions1_s) at(salience=(2(2)10))
marginsplot, ytitle(ME intra-party divisions on Δ party position, size(small)) xtitle(Party salience) recast(line) recastci(rarea) ci1opt(fcolor(midblue%40) lcolor(midblue%40)) title("{bf: H2 CHES}") level(95) yline(0) ///
addplot(hist salience, yscale(r(-0.3 0.4) axis(1)) ylab(0(2)10, axis(2)) ylab(-0.3(0.1)0.4) ///
xlabel(2(2)10) xsc(r(2 10)) yaxis(2) ysc(axis(2) off alt) ///
fcolor(dkgreen%30) lcolor(dkgreen%30) legend(off))

graph save g1, replace

use "Keeping the team together_data_stacked2.dta", clear

eststo: reghdfe abs_position_change issue_divisions2_s salience vote vote_change government c.salience#c.issue_divisions2_s, cluster(party_id) absorb(election_id issue)
keep if e(sample) == 1
margins, dydx(issue_divisions2_s) at(salience=(2(2)10))
marginsplot, ytitle(ME intra-party divisions on Δ party position, size(small)) xtitle(Party salience) recast(line) recastci(rarea) ci1opt(fcolor(midblue%40) lcolor(midblue%40)) title("{bf: H2 CCS}") level(95) yline(0) ///
addplot(hist salience, yscale(r(-0.3 0.4) axis(1)) ylab(0(2)10, axis(2)) ylab(-0.3(0.1)0.4) ///
xlabel(2(2)10) xsc(r(2 10)) yaxis(2) ysc(axis(2) off alt) ///
fcolor(dkgreen%30) lcolor(dkgreen%30) legend(off))

graph save g2, replace

use "Keeping the team together_data_stacked2.dta", clear

eststo: reghdfe blur issue_divisions1_s salience vote vote_change government c.salience#c.issue_divisions1_s, cluster(party_id) absorb(election_id issue)
keep if e(sample) == 1
margins, dydx(issue_divisions1_s) at(salience=(2(2)10))
marginsplot, ytitle(ME intra-party divisions on blurring, size(small)) xtitle(Party salience) recast(line) recastci(rarea) ci1opt(fcolor(midblue%40) lcolor(midblue%40)) title("{bf: H3 CHES}") level(95) yline(0) ///
addplot(hist salience, yscale(r(-0.3 0.5) axis(1)) ylab(0(2)10, axis(2)) ylab(-0.3(0.1)0.4) ///
xlabel(2(2)10) xsc(r(2 10)) yaxis(2) ysc(axis(2) off alt) ///
fcolor(dkgreen%30) lcolor(dkgreen%30) legend(off))

graph save g3, replace

use "Keeping the team together_data_stacked2.dta", clear

eststo: reghdfe blur issue_divisions2_s salience vote vote_change government c.salience#c.issue_divisions2_s, cluster(party_id) absorb(election_id issue)
keep if e(sample) == 1
margins, dydx(issue_divisions2_s) at(salience=(2(2)10))
marginsplot, ytitle(ME intra-party divisions on blurring, size(small)) xtitle(Party salience) recast(line) recastci(rarea) ci1opt(fcolor(midblue%40) lcolor(midblue%40)) title("{bf: H3 CCS}") level(95) yline(0) ///
addplot(hist salience, yscale(r(-0.3 0.4) axis(1)) ylab(0(2)10, axis(2)) ylab(-0.3(0.1)0.4) ///
xlabel(2(2)10) xsc(r(2 10)) yaxis(2) ysc(axis(2) off alt) ///
fcolor(dkgreen%30) lcolor(dkgreen%30) legend(off))

graph save g4, replace

graph combine "g1" "g3" "g2" "g4", note("95% CIs", pos(5) size(vsmall))

graph export "figc2.png", replace

* Figure C3
use "Keeping the team together_data_stacked2.dta", clear

set scheme plotplain
eststo clear

eststo: reghdfe salience issue_divisions1_s party_system_salience vote vote_change government c.party_system_salience#c.issue_divisions1_s, cluster(party_id) absorb(election_id issue)
keep if e(sample) == 1
margins, dydx(issue_divisions1_s) at(party_system_salience=(2(2)10))
marginsplot, ytitle(ME intra-party divisions on salience, size(small)) xtitle(Party system salience) recast(line) recastci(rarea) ci1opt(fcolor(midblue%40) lcolor(midblue%40)) title("{bf: H1 CHES}") level(95) yline(0) ///
addplot(hist party_system_salience, yscale(r(-1.6 0.6) axis(1)) ylab(0(2)10, axis(2)) ylab(-1.6(0.2)0.6) ///
xlabel(2(2)10) xsc(r(2 10)) yaxis(2) ysc(axis(2) off alt) ///
fcolor(dkgreen%30) lcolor(dkgreen%30) legend(off))

graph save g1, replace

use "Keeping the team together_data_stacked2.dta", clear

eststo: reghdfe salience issue_divisions2_s party_system_salience vote vote_change government c.party_system_salience#c.issue_divisions2_s, cluster(party_id) absorb(election_id issue)
keep if e(sample) == 1
margins, dydx(issue_divisions2_s) at(party_system_salience=(2(2)10))
marginsplot, ytitle(ME intra-party divisions on salience, size(small)) xtitle(Party system salience) recast(line) recastci(rarea) ci1opt(fcolor(midblue%40) lcolor(midblue%40)) title("{bf: H1 CCS}") level(95) yline(0) ///
addplot(hist party_system_salience, yscale(r(-1.6 0.6) axis(1)) ylab(0(2)10, axis(2)) ylab(-1.6(0.2)0.6) ///
xlabel(2(2)10) xsc(r(2 10)) yaxis(2) ysc(axis(2) off alt) ///
fcolor(dkgreen%30) lcolor(dkgreen%30) legend(off))

graph save g2, replace

use "Keeping the team together_data_stacked2.dta", clear

eststo: reghdfe abs_position_change issue_divisions1_s party_system_salience vote vote_change government c.party_system_salience#c.issue_divisions1_s, cluster(party_id) absorb(election_id issue)
keep if e(sample) == 1
margins, dydx(issue_divisions1_s) at(party_system_salience=(2(2)10))
marginsplot, ytitle(ME intra-party divisions on Δ party position, size(small)) xtitle(Party system salience) recast(line) recastci(rarea) ci1opt(fcolor(midblue%40) lcolor(midblue%40)) title("{bf: H2 CHES}") level(95) yline(0) ///
addplot(hist party_system_salience, yscale(r(-1.6 0.6) axis(1)) ylab(0(2)10, axis(2)) ylab(-1.6(0.2)0.6) ///
xlabel(2(2)10) xsc(r(2 10)) yaxis(2) ysc(axis(2) off alt) ///
fcolor(dkgreen%30) lcolor(dkgreen%30) legend(off))

graph save g3, replace

use "Keeping the team together_data_stacked2.dta", clear

eststo: reghdfe abs_position_change issue_divisions2_s party_system_salience vote vote_change government c.party_system_salience#c.issue_divisions2_s, cluster(party_id) absorb(election_id issue)
keep if e(sample) == 1
margins, dydx(issue_divisions2_s) at(party_system_salience=(2(2)10))
marginsplot, ytitle(ME intra-party divisions on Δ party position, size(small)) xtitle(Party system salience) recast(line) recastci(rarea) ci1opt(fcolor(midblue%40) lcolor(midblue%40)) title("{bf: H2 CCS}") level(95) yline(0) ///
addplot(hist party_system_salience, yscale(r(-1.6 0.6) axis(1)) ylab(0(2)10, axis(2)) ylab(-1.6(0.2)0.6) ///
xlabel(2(2)10) xsc(r(2 10)) yaxis(2) ysc(axis(2) off alt) ///
fcolor(dkgreen%30) lcolor(dkgreen%30) legend(off))

graph save g4, replace

use "Keeping the team together_data_stacked2.dta", clear

eststo: reghdfe blur issue_divisions1_s party_system_salience vote vote_change government c.party_system_salience#c.issue_divisions1_s, cluster(party_id) absorb(election_id issue)
keep if e(sample) == 1
margins, dydx(issue_divisions1_s) at(party_system_salience=(2(2)10))
marginsplot, ytitle(ME intra-party divisions on blurring, size(small)) xtitle(Party system salience) recast(line) recastci(rarea) ci1opt(fcolor(midblue%40) lcolor(midblue%40)) title("{bf: H3 CHES}") level(95) yline(0) ///
addplot(hist party_system_salience, yscale(r(-1.6 0.6) axis(1)) ylab(0(2)10, axis(2)) ylab(-1.6(0.2)0.6) ///
xlabel(2(2)10) xsc(r(2 10)) yaxis(2) ysc(axis(2) off alt) ///
fcolor(dkgreen%30) lcolor(dkgreen%30) legend(off))

graph save g5, replace

use "Keeping the team together_data_stacked2.dta", clear

eststo: reghdfe blur issue_divisions2_s party_system_salience vote vote_change government c.party_system_salience#c.issue_divisions2_s, cluster(party_id) absorb(election_id issue)
keep if e(sample) == 1
margins, dydx(issue_divisions2_s) at(party_system_salience=(2(2)10))
marginsplot, ytitle(ME intra-party divisions on blurring, size(small)) xtitle(Party system salience) recast(line) recastci(rarea) ci1opt(fcolor(midblue%40) lcolor(midblue%40)) title("{bf: H3 CCS}") level(95) yline(0) ///
addplot(hist party_system_salience, yscale(r(-1.6 0.6) axis(1)) ylab(0(2)10, axis(2)) ylab(-1.6(0.2)0.6) ///
xlabel(2(2)10) xsc(r(2 10)) yaxis(2) ysc(axis(2) off alt) ///
fcolor(dkgreen%30) lcolor(dkgreen%30) legend(off))

graph save g6, replace

graph combine "g1" "g3" "g5" "g2" "g4" "g6", note("95% CIs", pos(5) size(vsmall))

graph export "figc3.png", replace

* Figure C4
use "Keeping the team together_data_stacked2.dta", clear

set scheme stcolor
eststo clear
// H1
eststo: reg salience issue_divisions1 vote vote_change government c.issue_divisions1#i.mainstream_narrow i.mainstream_narrow i.election_id i.issue, vce(cluster party_id) 
margins mainstream_narrow, at(issue_divisions1=(0(2)10))
marginsplot, ytitle(Predicted issue salience, size(small)) recast(line) ciopts(recast(rline) lpattern(dash)) title("") level(95) yline(0)
graph save g1, replace
eststo: reg salience issue_divisions2 vote vote_change government c.issue_divisions2#i.mainstream_narrow i.mainstream_narrow i.election_id i.issue, vce(cluster party_id) 
margins mainstream_narrow, at(issue_divisions2=(0(2)10))
marginsplot, ytitle(Predicted issue salience, size(small)) recast(line) ciopts(recast(rline) lpattern(dash)) title("") level(95) 
graph save g2, replace
eststo: qui: reg salience issue_divisions1 vote vote_change government c.issue_divisions1#i.wecee i.wecee i.issue, vce(cluster party_id) 
margins wecee, at(issue_divisions1=(0(2)10))
marginsplot, ytitle(Predicted issue salience, size(small)) recast(line) ciopts(recast(rline) lpattern(dash)) title("") level(95) yline(0)
graph save g3, replace
eststo: qui: reg salience issue_divisions2 vote vote_change government c.issue_divisions2#i.wecee i.wecee i.issue, vce(cluster party_id) 
margins wecee,  at(issue_divisions2=(0(2)10))
marginsplot, ytitle(Predicted issue salience, size(small)) recast(line) ciopts(recast(rline) lpattern(dash)) title("") level(95) 
graph save g4, replace


graph combine "g1" "g2" "g3" "g4", col(2)

graph export "figc4.png", replace

* Figure C5
eststo: qui: reg abs_position_change issue_divisions1 vote vote_change government c.issue_divisions1#i.mainstream_narrow i.mainstream_narrow i.election_id i.issue, vce(cluster party_id) 
margins mainstream_narrow, at(issue_divisions1=(0(2)10))
marginsplot, ytitle(Predicted Δ position, size(small)) recast(line) ciopts(recast(rline) lpattern(dash)) title("") level(95) yline(0)
graph save g1, replace
eststo: qui: reg abs_position_change issue_divisions2 vote vote_change government c.issue_divisions2#i.mainstream_narrow i.mainstream_narrow i.election_id i.issue, vce(cluster party_id) 
margins mainstream_narrow,  at(issue_divisions2=(0(2)10))
marginsplot, ytitle(Predicted Δ position, size(small)) recast(line) ciopts(recast(rline) lpattern(dash)) title("") level(95)
graph save g2, replace
eststo: qui: reg abs_position_change issue_divisions1 vote vote_change government c.issue_divisions1#i.wecee i.wecee i.issue, vce(cluster party_id) 
margins wecee, at(issue_divisions1=(0(2)10))
marginsplot, ytitle(Predicted Δ position, size(small)) recast(line) ciopts(recast(rline) lpattern(dash)) title("") level(95) yline(0)
graph save g3, replace
eststo: qui: reg abs_position_change issue_divisions2 vote vote_change government c.issue_divisions2#i.wecee i.wecee i.issue, vce(cluster party_id) 
margins wecee,  at(issue_divisions2=(0(2)10))
marginsplot, ytitle(Predicted Δ position, size(small)) recast(line) ciopts(recast(rline) lpattern(dash)) title("") level(95)
graph save g4, replace

graph combine "g1" "g2" "g3" "g4", col(2)

graph export "figc5.png", replace

* Figure C6
eststo: qui: reg blur issue_divisions1 vote vote_change government c.issue_divisions1#i.mainstream_narrow i.mainstream_narrow i.election_id i.issue, vce(cluster party_id) 
margins mainstream_narrow, at(issue_divisions1=(0(2)10))
marginsplot, ytitle(Predicted issue blurring, size(small)) recast(line) ciopts(recast(rline) lpattern(dash)) title("") level(95) yline(0)
graph save g1, replace
eststo: qui: reg blur issue_divisions2 vote vote_change government c.issue_divisions2#i.mainstream_narrow i.mainstream_narrow i.election_id i.issue, vce(cluster party_id) 
margins mainstream_narrow, at(issue_divisions2=(0(2)10))
marginsplot, ytitle(Predicted issue blurring, size(small)) recast(line) ciopts(recast(rline) lpattern(dash)) title("") level(95)
graph save g2, replace
eststo: qui: reg blur issue_divisions1 vote vote_change government c.issue_divisions1#i.wecee i.wecee i.issue, vce(cluster party_id) 
margins wecee, at(issue_divisions1=(0(2)10))
marginsplot, ytitle(Predicted issue blurring, size(small)) recast(line) ciopts(recast(rline) lpattern(dash)) title("") level(95) 
graph save g3, replace
eststo: qui: reg blur issue_divisions2 vote vote_change government c.issue_divisions2#i.wecee i.wecee i.issue, vce(cluster party_id) 
margins wecee,  at(issue_divisions2=(0(2)10))
marginsplot, ytitle(Predicted issue blurring, size(small)) recast(line) ciopts(recast(rline) lpattern(dash)) title("") level(95)
graph save g4, replace

graph combine "g1" "g2" "g3" "g4", col(2)

graph export "figc6.png", replace

